[Xorg-commit] xc/lib/font/fontfile dirfile.c,1.1.4.2,1.1.4.3

Kaleb Keithley xorg-commit at pdx.freedesktop.org
Wed May 9 17:30:30 EEST 2007


Committed by: kaleb

Update of /cvs/xorg/xc/lib/font/fontfile
In directory pdx:/home/kaleb/xorg/xc.XORG-CURRENT/lib/font/fontfile

Modified Files:
      Tag: XORG-CURRENT
	dirfile.c 
Log Message:
Fix an exploitable buffer overflow.


Index: dirfile.c
===================================================================
RCS file: /cvs/xorg/xc/lib/font/fontfile/dirfile.c,v
retrieving revision 1.1.4.2
retrieving revision 1.1.4.3
diff -u -d -r1.1.4.2 -r1.1.4.3
--- dirfile.c	26 Nov 2003 22:48:40 -0000	1.1.4.2
+++ dirfile.c	7 Feb 2004 21:19:50 -0000	1.1.4.3
@@ -1,4 +1,5 @@
 /* $Xorg: dirfile.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */
+/* $XdotOrg$ */
 
 /*
 
@@ -291,6 +292,10 @@
 	    status = AllocError;
 	    break;
 	case NAME:
+	    if (strlen(lexToken) >= sizeof alias) {
+		status = BadFontPath;
+		break;
+	    }
 	    strcpy(alias, lexToken);
 	    token = lexAlias(file, &lexToken);
 	    switch (token) {





More information about the xorg-commit mailing list