Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 May 2000 11:56:36 -0400 (EDT)
From:      Trevor Johnson <trevor@jpj.net>
To:        Michal Zalewski <lcamtuf@tpi.pl>, Kris Kennaway <kris@FreeBSD.org>, Jean-Marc Zucconi <jmz@FreeBSD.org>
Cc:        freebsd-ports@FreeBSD.org
Subject:   patch for overflow in XFree86 4.0 server
Message-ID:  <Pine.BSI.4.21.0005231136480.12097-100000@blues.jpj.net>

next in thread | raw e-mail | index | archive | help
In cursory testing under FreeBSD 4.0-STABLE, this patch eliminated the
overflow for me.  Please review and comment.  A Web page with links to
discussion of the problem is at http://jpj.net/~trevor/xfree.html .

--- programs/Xserver/xkb/xkbInit.c.orig	Mon Oct  5 05:02:55 1998
+++ programs/Xserver/xkb/xkbInit.c	Tue May 23 16:52:19 2000
@@ -910,7 +910,8 @@
 	return 1;
     }
     else if (strncmp(argv[i], "-xkbmap", 7) == 0) {
-	if(++i < argc) {
+	i++;
+	if ((i < argc) && (strlen(argv[i]) < PATH_MAX)) {
 	    XkbInitialMap= argv[i];
 	    return 2;
 	}
--
Trevor Johnson
http://jpj.net/~trevor/gpgkey.txt



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSI.4.21.0005231136480.12097-100000>