Module Name:    xsrc
Committed By:   christos
Date:           Mon Aug 15 21:19:27 UTC 2011

Modified Files:
        xsrc/external/mit/libXfont/dist/src/fontfile: decompress.c

Log Message:
P
Fix CVS-2011-2895, buffer overflow in decompress


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 \
    xsrc/external/mit/libXfont/dist/src/fontfile/decompress.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/libXfont/dist/src/fontfile/decompress.c
diff -u xsrc/external/mit/libXfont/dist/src/fontfile/decompress.c:1.1.1.2 xsrc/external/mit/libXfont/dist/src/fontfile/decompress.c:1.2
--- xsrc/external/mit/libXfont/dist/src/fontfile/decompress.c:1.1.1.2	Wed Jun 10 03:33:40 2009
+++ xsrc/external/mit/libXfont/dist/src/fontfile/decompress.c	Mon Aug 15 17:19:27 2011
@@ -261,6 +261,8 @@
      	 */
     	while ( code >= 256 )
     	{
+	    if (stackp - de_stack >= STACK_SIZE - 1)
+		return BUFFILEEOF;
 	    *stackp++ = file->tab_suffix[code];
 	    code = file->tab_prefix[code];
     	}

Reply via email to