From 082e831303bb8c8c63ce40d79bee10855112c014 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Thu, 6 Oct 2016 23:34:06 +0200 Subject: Revert "Add a couple fixups for the security patches" This reverts commit b092864a39bbcd4f34c5c26a7cd0df90e235815d. We will use the proper libX11 upstream patches now. --- nx-X11/lib/X11/Font.c | 1 - nx-X11/lib/X11/XKBGetMap.c | 2 +- nx-X11/lib/X11/XKBNames.c | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/nx-X11/lib/X11/Font.c b/nx-X11/lib/X11/Font.c index cc08fda27..c0efb3f45 100644 --- a/nx-X11/lib/X11/Font.c +++ b/nx-X11/lib/X11/Font.c @@ -508,7 +508,6 @@ _XF86BigfontQueryFont ( any real font needs, so the combined total doesn't overflow either */ if (reply.nUniqCharInfos > ((ULONG_MAX / 2) / SIZEOF(xCharInfo)) || reply.nCharInfos > ((ULONG_MAX / 2) / sizeof(CARD16))) { - Xfree(fs->properties); Xfree((char *) fs); _XEatDataWords(dpy, reply_left); return (XFontStruct *)NULL; diff --git a/nx-X11/lib/X11/XKBGetMap.c b/nx-X11/lib/X11/XKBGetMap.c index 391d7aa89..5eb1d41bf 100644 --- a/nx-X11/lib/X11/XKBGetMap.c +++ b/nx-X11/lib/X11/XKBGetMap.c @@ -427,7 +427,7 @@ XkbServerMapPtr srv; if ( rep->totalVModMapKeys>0 ) { if (((int) rep->firstVModMapKey + rep->nVModMapKeys) - > xkb->max_key_code + 1) + > xkb->max_key_code) return BadLength; if (((xkb->server==NULL)||(xkb->server->vmodmap==NULL))&& (XkbAllocServerMap(xkb,XkbVirtualModMapMask,0)!=Success)) { diff --git a/nx-X11/lib/X11/XKBNames.c b/nx-X11/lib/X11/XKBNames.c index c82b59e30..1f5207493 100644 --- a/nx-X11/lib/X11/XKBNames.c +++ b/nx-X11/lib/X11/XKBNames.c @@ -180,7 +180,7 @@ _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) + else if ( ((int)rep->firstKey + rep->nKeys) > xkb->max_key_code) goto BAILOUT; if (names->keys!=NULL) { if (!_XkbCopyFromReadBuffer(&buf, -- cgit v1.2.3