Resolves: bz 436648

This commit is contained in:
Neil Horman 2008-03-10 18:36:31 +00:00
parent b21a72abf4
commit fda3dd3800
2 changed files with 30 additions and 1 deletions

View File

@ -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);
}

View File

@ -1,7 +1,7 @@
Summary: C source code tree search and browse tool Summary: C source code tree search and browse tool
Name: cscope Name: cscope
Version: 15.5 Version: 15.5
Release: 17%{?dist} Release: 18%{?dist}
Source0: http://unc.dl.sourceforge.net/sourceforge/cscope/cscope-15.5.tar.gz Source0: http://unc.dl.sourceforge.net/sourceforge/cscope/cscope-15.5.tar.gz
URL: http://cscope.sourceforge.net URL: http://cscope.sourceforge.net
License: BSD License: BSD
@ -24,6 +24,7 @@ Patch7:cscope-15.5-inv-overflow.patch
Patch8:cscope-15.5-ocs-sysdir.patch Patch8:cscope-15.5-ocs-sysdir.patch
Patch9:cscope-15.5-putstring-overflow.patch Patch9:cscope-15.5-putstring-overflow.patch
Patch10: cscope-15.5-fscanf-overflows.patch Patch10: cscope-15.5-fscanf-overflows.patch
Patch11: cscope-15.5-samelist.patch
%description %description
cscope is a mature, ncurses based, C source code tree browsing tool. It 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 %patch8 -p1
%patch9 -p1 %patch9 -p1
%patch10 -p1 %patch10 -p1
%patch11 -p1
%build %build
%configure %configure
@ -93,6 +95,9 @@ rm -f %{xemacs_lisp_path}/xcscope.el
rm -f %{emacs_lisp_path}/xcscope.el rm -f %{emacs_lisp_path}/xcscope.el
%changelog %changelog
* Mon Mar 10 2008 Neil Horman <nhorman@redhat.com> -15.5-18
- Fix samelist to properly absorb newlines (bz 436648)
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 15.5-17 * Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 15.5-17
- Autorebuild for GCC 4.3 - Autorebuild for GCC 4.3