aboutsummaryrefslogtreecommitdiffstats
path: root/x11-servers/XFree86-4-Server/files
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2004-02-09 20:04:25 +0800
committerdes <des@FreeBSD.org>2004-02-09 20:04:25 +0800
commitdaf6b2042a67b1d65fdb7bb99528f53e18751cae (patch)
tree33dad807fa1e449104998fc4a3575198a18af6c8 /x11-servers/XFree86-4-Server/files
parent6f217ca4d7c67213851e4b22fa16fafb95647120 (diff)
downloadfreebsd-ports-gnome-daf6b2042a67b1d65fdb7bb99528f53e18751cae.tar.gz
freebsd-ports-gnome-daf6b2042a67b1d65fdb7bb99528f53e18751cae.tar.zst
freebsd-ports-gnome-daf6b2042a67b1d65fdb7bb99528f53e18751cae.zip
Fix buffer overflow in font alias handling code.
Approved by: so
Diffstat (limited to 'x11-servers/XFree86-4-Server/files')
-rw-r--r--x11-servers/XFree86-4-Server/files/patch-dirfile.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/x11-servers/XFree86-4-Server/files/patch-dirfile.c b/x11-servers/XFree86-4-Server/files/patch-dirfile.c
new file mode 100644
index 000000000000..b0891cdd6ea8
--- /dev/null
+++ b/x11-servers/XFree86-4-Server/files/patch-dirfile.c
@@ -0,0 +1,13 @@
+--- lib/font/fontfile/dirfile.c.orig Fri May 31 20:45:50 2002
++++ lib/font/fontfile/dirfile.c Thu Feb 5 00:19:57 2004
+@@ -286,6 +286,10 @@
+ status = AllocError;
+ break;
+ case NAME:
++ if (strlen(lexToken) >= sizeof(alias)) {
++ status = BadFontPath;
++ break;
++ }
+ strcpy(alias, lexToken);
+ token = lexAlias(file, &lexToken);
+ switch (token) {