rpms/cscope/devel cscope-15.5-samelist.patch, NONE, 1.1 cscope.spec, 1.33, 1.34

Neil Horman (nhorman) fedora-extras-commits at redhat.com
Mon Mar 10 18:37:04 UTC 2008


Author: nhorman

Update of /cvs/extras/rpms/cscope/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11706

Modified Files:
	cscope.spec 
Added Files:
	cscope-15.5-samelist.patch 
Log Message:
Resolves: bz 436648

cscope-15.5-samelist.patch:

--- NEW FILE cscope-15.5-samelist.patch ---
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);
 		}


Index: cscope.spec
===================================================================
RCS file: /cvs/extras/rpms/cscope/devel/cscope.spec,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- cscope.spec	19 Feb 2008 16:05:50 -0000	1.33
+++ cscope.spec	10 Mar 2008 18:36:31 -0000	1.34
@@ -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 @@
 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 @@
 %patch8 -p1
 %patch9 -p1 
 %patch10 -p1
+%patch11 -p1
 
 %build
 %configure
@@ -93,6 +95,9 @@
 rm -f %{emacs_lisp_path}/xcscope.el
 
 %changelog
+* Mon Mar 10 2008 Neil Horman <nhorman at redhat.com> -15.5-18
+- Fix samelist to properly absorb newlines (bz 436648)
+
 * Tue Feb 19 2008 Fedora Release Engineering <rel-eng at fedoraproject.org> - 15.5-17
 - Autorebuild for GCC 4.3
 




More information about the fedora-extras-commits mailing list