From a9a3b3d099f3f42b9cd63e716d5376ae231dfbf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Mon, 9 Feb 2004 12:04:25 +0000 Subject: Fix buffer overflow in font alias handling code. Approved by: so --- x11-servers/XFree86-4-Server/files/patch-dirfile.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 x11-servers/XFree86-4-Server/files/patch-dirfile.c (limited to 'x11-servers/XFree86-4-Server/files/patch-dirfile.c') 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) { -- cgit v1.2.3