[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

X Strike Force XFree86 SVN commit: r1717 - in trunk/debian: . patches



Author: branden
Date: 2004-08-09 15:45:55 -0500 (Mon, 09 Aug 2004)
New Revision: 1717

Modified:
   trunk/debian/CHANGESETS
   trunk/debian/changelog
   trunk/debian/patches/000_stolen_from_HEAD.diff
Log:
Grab fix from XFree86 CVS (2003-05-07) to bounds problems in *scanf(),
snprintf() and strncpy() calls in lbxproxy, makepsres, and xedit.


Modified: trunk/debian/CHANGESETS
===================================================================
--- trunk/debian/CHANGESETS	2004-08-09 18:43:34 UTC (rev 1716)
+++ trunk/debian/CHANGESETS	2004-08-09 20:45:55 UTC (rev 1717)
@@ -250,4 +250,8 @@
 DPI (dots-per-inch) value used by the X server?".
     1714
 
+Grab fix from XFree86 CVS (2003-05-07) to bounds problems in *scanf(),
+snprintf() and strncpy() calls in lbxproxy, makepsres, and xedit.
+    1717
+
 vim:set ai et sts=4 sw=4 tw=80:

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2004-08-09 18:43:34 UTC (rev 1716)
+++ trunk/debian/changelog	2004-08-09 20:45:55 UTC (rev 1717)
@@ -183,6 +183,9 @@
     graphical rulers) sized incorrectly?" into new question "How do I set the
     DPI (dots-per-inch) value used by the X server?".
 
+  * Grab fix from XFree86 CVS (2003-05-07) to bounds problems in *scanf(),
+    snprintf() and strncpy() calls in lbxproxy, makepsres, and xedit.
+
   Changes by Fabio M. Di Nitto and Branden Robinson:
 
   * Support building only the parts of the source tree needed by
@@ -215,7 +218,7 @@
 
   * Get glxinfo to link properly with g++ (instead of adding -lstdc++).
 
- -- Branden Robinson <branden@debian.org>  Mon,  9 Aug 2004 13:18:17 -0500
+ -- Branden Robinson <branden@debian.org>  Mon,  9 Aug 2004 14:22:21 -0500
 
 xfree86 (4.3.0.dfsg.1-6) unstable; urgency=low
 

Modified: trunk/debian/patches/000_stolen_from_HEAD.diff
===================================================================
--- trunk/debian/patches/000_stolen_from_HEAD.diff	2004-08-09 18:43:34 UTC (rev 1716)
+++ trunk/debian/patches/000_stolen_from_HEAD.diff	2004-08-09 20:45:55 UTC (rev 1717)
@@ -266,6 +266,13 @@
    198. Fix bug (Bugzilla #315) in _XTextPropertyToTextList() that causes
         an application crash in some circumstances (Ivan Pascal).
 
+xc/programs/lbxproxy/di/pm.c @ 1.10
+xc/programs/makepsres/makepsres.c @ 1.8
+xc/programs/xedit/util.c @ 1.26
+  *scanf(), snprintf() and strncpy() bounds fixes. (Anil Madhavapeddy,
+  using his gcc patch that checks for this kind of errors).
+[Matthieu Herrb]
+
 diff -urN xc.orig/config/imake/imake.c xc/config/imake/imake.c
 --- xc.orig/config/imake/imake.c	2002-12-17 09:48:27.000000000 +1100
 +++ xc/config/imake/imake.c	2003-04-09 01:58:14.000000000 +1000
@@ -6166,3 +6173,141 @@
  	} else
  	    str_ptr++;
  
+Index: xc/programs/lbxproxy/di/pm.c
+===================================================================
+RCS file: /cvs/xc/programs/lbxproxy/di/pm.c,v
+retrieving revision 1.9
+retrieving revision 1.10
+diff -u -r1.9 -r1.10
+--- xc/programs/lbxproxy/di/pm.c	16 Sep 2002 18:06:20 -0000	1.9
++++ xc/programs/lbxproxy/di/pm.c	7 May 2003 20:54:42 -0000	1.10
+@@ -25,7 +25,7 @@
+ other dealings in this Software without prior written authorization
+ from The Open Group.
+ */
+-/* $XFree86: xc/programs/lbxproxy/di/pm.c,v 1.9 2002/09/16 18:06:20 eich Exp $ */
++/* $XFree86: xc/programs/lbxproxy/di/pm.c,v 1.10 2003/05/07 20:54:42 herrb Exp $ */
+ 
+ #include <ctype.h>
+ #include <stdio.h>
+@@ -190,7 +190,7 @@
+     if ((PM_iceConn = IceOpenConnection (
+ 	pmAddr,	NULL, 0, 0, sizeof(iceError), iceError)) == NULL)
+     {
+-	snprintf (errorString, sizeof(errorString),
++	snprintf (errorString, ERROR_STRING_SIZE,
+ 	    "Could not open ICE connection to proxy manager: %s", iceError);
+ 	return 0;
+     }
+@@ -203,7 +203,7 @@
+     if (setupstat != IceProtocolSetupSuccess)
+     {
+ 	IceCloseConnection (PM_iceConn);
+-	snprintf (errorString,sizeof(errorString),
++	snprintf (errorString, ERROR_STRING_SIZE,
+ 	    "Could not initialize proxy management protocol: %s",
+ 	    iceError);
+ 	return 0;
+Index: xc/programs/makepsres/makepsres.c
+===================================================================
+RCS file: /cvs/xc/programs/makepsres/makepsres.c,v
+retrieving revision 1.7
+retrieving revision 1.8
+diff -u -r1.7 -r1.8
+--- xc/programs/makepsres/makepsres.c	18 Sep 2002 17:11:51 -0000	1.7
++++ xc/programs/makepsres/makepsres.c	7 May 2003 20:54:42 -0000	1.8
+@@ -35,7 +35,7 @@
+  * 
+  * Author:  Adobe Systems Incorporated
+  */
+-/* $XFree86: xc/programs/makepsres/makepsres.c,v 1.7 2002/09/18 17:11:51 tsi Exp $ */
++/* $XFree86: xc/programs/makepsres/makepsres.c,v 1.8 2003/05/07 20:54:42 herrb Exp $ */
+ 
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -686,7 +686,7 @@
+     if (fgets (lineBuffer, BUFFER_SIZE, file) == NULL)
+       break;
+ 
+-    sscanf (lineBuffer, "%64[%a-zA-Z]", lineKey);
++    sscanf (lineBuffer, "%63[%a-zA-Z]", lineKey);
+     if (strcmp (key, lineKey) == 0) {
+       result = strchr (lineBuffer, ' ');
+       if (result != NULL) {
+@@ -1131,12 +1131,12 @@
+     while (found != 0x7F && SkipToEitherCharacter (file, '/', 'e', &out)) {
+ 	/* If we encounter an eexec, skip the rest of the file */
+ 	if (out == 'e') {
+-	    if (fscanf (file, "%256s", key) != 1) continue;
++	    if (fscanf (file, "%255s", key) != 1) continue;
+ 	    if (strcmp(key, "exec") == 0) break;
+ 	    continue;
+ 	}
+ 
+-	if (fscanf (file, "%256s", key) != 1) continue;
++	if (fscanf (file, "%255s", key) != 1) continue;
+ 	if (!SkipWhiteSpace(file)) break;
+ 	if (!ReadItem(file, buf, 256)) break;
+ 
+@@ -1228,7 +1228,7 @@
+ 
+     if (pointer == NULL) return;
+ 
+-    sscanf (pointer, "%*256s%256s", resourceName);
++    sscanf (pointer, "%*256s%255s", resourceName);
+     StripName (resourceName);
+ 
+     AddResource (resourceType, resourceName, fileName, false);
+@@ -1252,7 +1252,7 @@
+ 
+     while (SkipToCharacter(file, '\n')) {
+ 	if (!SkipWhiteSpace(file)) break;
+-	if (fscanf (file, "%256s", key) != 1) continue;
++	if (fscanf (file, "%255s", key) != 1) continue;
+ 	if (!SkipWhiteSpace(file)) break;
+ 
+ 	if ((found & 1) == 0 && strcmp(key, "FONT") == 0) {
+@@ -1314,7 +1314,7 @@
+     if (pointer == NULL)
+ 	    return;
+ 
+-    sscanf (pointer, "%256s", fontName);
++    sscanf (pointer, "%255s", fontName);
+ 
+     extraCr = strchr (fontName, '\r'); /* Handle DOS newlines */
+ 
+@@ -2056,7 +2056,7 @@
+ 
+     stdinDirectories = true;
+ 
+-    while (scanf("%256s", buf) == 1) {
++    while (scanf("%255s", buf) == 1) {
+ 	directoryCount++;
+ 	directories = (char **) ckrealloc((char *) directories,
+ 				  directoryCount * sizeof(char *),
+Index: xc/programs/xedit/util.c
+===================================================================
+RCS file: /cvs/xc/programs/xedit/util.c,v
+retrieving revision 1.25
+retrieving revision 1.26
+diff -u -r1.25 -r1.26
+--- xc/programs/xedit/util.c	4 Dec 2002 05:27:56 -0000	1.25
++++ xc/programs/xedit/util.c	7 May 2003 20:54:43 -0000	1.26
+@@ -24,7 +24,7 @@
+  * used in advertising or publicity pertaining to distribution of the software
+  * without specific, written prior permission.
+  */
+-/* $XFree86: xc/programs/xedit/util.c,v 1.25 2002/12/04 05:27:56 paulo Exp $ */
++/* $XFree86: xc/programs/xedit/util.c,v 1.26 2003/05/07 20:54:43 herrb Exp $ */
+ 
+ #include <stdio.h>
+ #include <stdlib.h>		/* for realpath() */
+@@ -858,7 +858,7 @@
+ 	return;
+ 
+     if (*num_params == 1) {
+-	strncpy(path, params[0], sizeof(path - 2));
++	strncpy(path, params[0], sizeof(path) - 2);
+ 	path[sizeof(path) - 2] = '\0';
+     }
+     else {



Reply to: