NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/48170



The following reply was made to PR lib/48170; it has been noted by GNATS.

From: riz%NetBSD.org@localhost
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: lib/48170
Date: Tue, 17 Sep 2013 14:46:46 -0700

 Here's a smaller patch based on the above, tested, and what I'm going
 to submit for pullup.
 
 
 Index: xsrc/external/mit/libX11/dist/src/xkb/XKBNames.c
 diff -u xsrc/external/mit/libX11/dist/src/xkb/XKBNames.c:1.1.1.4.6.1 
xsrc/external/mit/libX11/dist/src/xkb/XKBNames.c:1.1.1.5
 --- xsrc/external/mit/libX11/dist/src/xkb/XKBNames.c:1.1.1.4.6.1       Thu Jun 
 6 03:50:17 2013
 +++ xsrc/external/mit/libX11/dist/src/xkb/XKBNames.c   Thu May 30 23:04:42 2013
 @@ -180,7 +180,7 @@
            nKeys= xkb->max_key_code+1;
            names->keys= _XkbTypedCalloc(nKeys,XkbKeyNameRec);
        }
 -      else if ( ((int)rep->firstKey + rep->nKeys) > xkb->max_key_code)
 +      if ( ((int)rep->firstKey + rep->nKeys) > xkb->max_key_code + 1)
            goto BAILOUT;
        if (names->keys!=NULL) {
            if (!_XkbCopyFromReadBuffer(&buf,
 Index: xsrc/external/mit/libX11/dist/src/xkb/XKBGetMap.c
 diff -u xsrc/external/mit/libX11/dist/src/xkb/XKBGetMap.c:1.1.1.4.6.1 
xsrc/external/mit/libX11/dist/src/xkb/XKBGetMap.c:1.1.1.5
 --- xsrc/external/mit/libX11/dist/src/xkb/XKBGetMap.c:1.1.1.4.6.1      Thu Jun 
 6 03:50:17 2013
 +++ xsrc/external/mit/libX11/dist/src/xkb/XKBGetMap.c  Thu May 30 23:04:42 2013
 @@ -426,7 +426,7 @@
  
      if ( rep->totalVModMapKeys>0 ) {
        if (((int) rep->firstVModMapKey + rep->nVModMapKeys)
 -           > xkb->max_key_code)
 +           > xkb->max_key_code + 1)
            return BadLength;
        if (((xkb->server==NULL)||(xkb->server->vmodmap==NULL))&&
            (XkbAllocServerMap(xkb,XkbVirtualModMapMask,0)!=Success)) {
 


Home | Main Index | Thread Index | Old Index