aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/X11/XKBNames.c
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/lib/X11/XKBNames.c')
-rw-r--r--nx-X11/lib/X11/XKBNames.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/nx-X11/lib/X11/XKBNames.c b/nx-X11/lib/X11/XKBNames.c
index 04cd6f3e3..c82b59e30 100644
--- a/nx-X11/lib/X11/XKBNames.c
+++ b/nx-X11/lib/X11/XKBNames.c
@@ -180,6 +180,8 @@ _XkbReadGetNamesReply( Display * dpy,
nKeys= xkb->max_key_code+1;
names->keys= _XkbTypedCalloc(nKeys,XkbKeyNameRec);
}
+ else if ( ((int)rep->firstKey + rep->nKeys) > xkb->max_key_code + 1)
+ goto BAILOUT;
if (names->keys!=NULL) {
if (!_XkbCopyFromReadBuffer(&buf,
(char *)&names->keys[rep->firstKey],