From fda3dd380011fb4dc172b48c2dd84c979e5a005a Mon Sep 17 00:00:00 2001 From: Neil Horman Date: Mon, 10 Mar 2008 18:36:31 +0000 Subject: [PATCH] Resolves: bz 436648 --- cscope-15.5-samelist.patch | 24 ++++++++++++++++++++++++ cscope.spec | 7 ++++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 cscope-15.5-samelist.patch diff --git a/cscope-15.5-samelist.patch b/cscope-15.5-samelist.patch new file mode 100644 index 0000000..b314e44 --- /dev/null +++ b/cscope-15.5-samelist.patch @@ -0,0 +1,24 @@ +diff -up cscope-15.5/src/build.c.orig cscope-15.5/src/build.c +--- cscope-15.5/src/build.c.orig 2008-03-10 14:12:49.000000000 -0400 ++++ cscope-15.5/src/build.c 2008-03-10 14:13:32.000000000 -0400 +@@ -106,16 +106,17 @@ samelist(FILE *oldrefs, char **names, in + { + char oldname[PATHLEN + 1]; /* name in old cross-reference */ + int oldcount; +- int i; ++ int i, matchcnt; + + /* see if the number of names is the same */ +- if (fscanf(oldrefs, "%d", &oldcount) != 1 || ++ if (fscanf(oldrefs, "%d\n", &oldcount) != 1 || + oldcount != count) { + return(NO); + } + /* see if the name list is the same */ + for (i = 0; i < count; ++i) { +- if (! fgets(oldname, sizeof(oldname), oldrefs)|| ++ matchcnt = fscanf(oldrefs,"%s\n",oldname); ++ if ((! matchcnt) || + strnotequal(oldname, names[i])) { + return(NO); + } diff --git a/cscope.spec b/cscope.spec index 3fb4db5..85c8850 100644 --- a/cscope.spec +++ b/cscope.spec @@ -1,7 +1,7 @@ Summary: C source code tree search and browse tool Name: cscope Version: 15.5 -Release: 17%{?dist} +Release: 18%{?dist} Source0: http://unc.dl.sourceforge.net/sourceforge/cscope/cscope-15.5.tar.gz URL: http://cscope.sourceforge.net License: BSD @@ -24,6 +24,7 @@ Patch7:cscope-15.5-inv-overflow.patch Patch8:cscope-15.5-ocs-sysdir.patch Patch9:cscope-15.5-putstring-overflow.patch Patch10: cscope-15.5-fscanf-overflows.patch +Patch11: cscope-15.5-samelist.patch %description cscope is a mature, ncurses based, C source code tree browsing tool. It @@ -45,6 +46,7 @@ matches for use in file editing. %patch8 -p1 %patch9 -p1 %patch10 -p1 +%patch11 -p1 %build %configure @@ -93,6 +95,9 @@ rm -f %{xemacs_lisp_path}/xcscope.el rm -f %{emacs_lisp_path}/xcscope.el %changelog +* Mon Mar 10 2008 Neil Horman -15.5-18 +- Fix samelist to properly absorb newlines (bz 436648) + * Tue Feb 19 2008 Fedora Release Engineering - 15.5-17 - Autorebuild for GCC 4.3