Module Name: xsrc
Committed By: wiz
Date: Tue Jan 7 07:41:59 UTC 2014
Modified Files:
xsrc/external/mit/libXfont/dist/src/bitmap: bdfread.c
Log Message:
CVS-2013-6462:
>From aeabb3efa6905e11c479e2e5319f2b6b3ab22009 Mon Sep 17 00:00:00 2001
From: Alan Coopersmith <[email protected]>
Date: Mon, 23 Dec 2013 18:34:02 -0800
Subject: [PATCH:libXfont 1/2] CVE-2013-XXXX: unlimited sscanf can overflow
stack buffer in bdfReadCharacters()
Fixes cppcheck warning:
[lib/libXfont/src/bitmap/bdfread.c:341]: (warning)
scanf without field width limits can crash with huge input data.
Signed-off-by: Alan Coopersmith <[email protected]>
Reviewed-by: Matthieu Herrb <[email protected]>
Reviewed-by: Jeremy Huddleston Sequoia <[email protected]>
---
src/bitmap/bdfread.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.2 \
xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.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/bitmap/bdfread.c
diff -u xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c:1.1.1.3 xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c:1.2
--- xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c:1.1.1.3 Fri May 31 01:08:57 2013
+++ xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c Tue Jan 7 07:41:59 2014
@@ -338,7 +338,7 @@ bdfReadCharacters(FontFilePtr file, Font
char charName[100];
int ignore;
- if (sscanf((char *) line, "STARTCHAR %s", charName) != 1) {
+ if (sscanf((char *) line, "STARTCHAR %99s", charName) != 1) {
bdfError("bad character name in BDF file\n");
goto BAILOUT; /* bottom of function, free and return error */
}