summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ErrDes.c3
-rw-r--r--src/xkb/XKBSetGeom.c3
2 files changed, 4 insertions, 2 deletions
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 (sz<BUFSIZE) {
+ if (sz < (dpy->bufmax - dpy->buffer)) {
BufAlloc(char *,wire,sz);
tbuf= NULL;
}