From 6769ccda88caf27d1441d335ef2b318a047a612b Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Mon, 21 Mar 2005 04:58:21 +0000 Subject: xc/lib/X11/ErrDes.c //bugs.freedesktop.org/show_bug.cgi?id=132) Patch #2168 (https://bugs.freedesktop.org/attachment.cgi?id=2168) Replace a couple of BUFSIZE uses with better values to check against. Fixes by Stuart Anderson --- src/ErrDes.c | 3 ++- src/xkb/XKBSetGeom.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ErrDes.c b/src/ErrDes.c index 9f9656a1..2f1e1de4 100644 --- a/src/ErrDes.c +++ b/src/ErrDes.c @@ -1,5 +1,6 @@ /* * $Xorg: ErrDes.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ + * $XdotOrg: lib/X11/src/ErrDes.c,v 1.5 2005-03-21 04:58:21 alanc Exp $ */ /*********************************************************** @@ -173,7 +174,7 @@ XGetErrorDatabaseText( if (db) { tlen = strlen (name) + strlen (type) + 2; - if (tlen <= BUFSIZE) + if (tlen <= sizeof(temp)) tptr = temp; else tptr = Xmalloc (tlen); diff --git a/src/xkb/XKBSetGeom.c b/src/xkb/XKBSetGeom.c index 460594fa..148e5e54 100644 --- a/src/xkb/XKBSetGeom.c +++ b/src/xkb/XKBSetGeom.c @@ -1,4 +1,5 @@ /* $Xorg: XKBSetGeom.c,v 1.3 2000/08/17 19:45:03 cpqbld Exp $ */ +/* $XdotOrg: lib/X11/src/xkb/XKBSetGeom.c,v 1.3 2005-03-21 04:58:21 alanc Exp $ */ /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. @@ -400,7 +401,7 @@ char * wire,*tbuf; sz+= _SizeGeomDoodads(geom->num_doodads,geom->doodads); sz+= _SizeGeomKeyAliases(geom); req->length+= (sz/4); - if (szbufmax - dpy->buffer)) { BufAlloc(char *,wire,sz); tbuf= NULL; } -- cgit v1.2.3