diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-07-06 10:54:57 -0700 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2016-10-19 21:40:29 +0200 |
commit | 37b8d68832cfd6f20b321d9d7e757027c75677f2 (patch) | |
tree | 4534d2ba13f58bf605575ac531ed7e8894184746 /nx-X11/lib/X11 | |
parent | aa7053b3eea7c98e155caf6ff6fd652f55b0547e (diff) | |
download | nx-libs-37b8d68832cfd6f20b321d9d7e757027c75677f2.tar.gz nx-libs-37b8d68832cfd6f20b321d9d7e757027c75677f2.tar.bz2 nx-libs-37b8d68832cfd6f20b321d9d7e757027c75677f2.zip |
Fix map->num_types check in XkbAddKeyType()
Check is intended to ensure we allocate at least XkbNumRequiredTypes
in map, but was accidentally marked with a ! causing the wrong check.
Reported-by: Harms <wharms@bfs,de>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
Diffstat (limited to 'nx-X11/lib/X11')
-rw-r--r-- | nx-X11/lib/X11/XKBMAlloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nx-X11/lib/X11/XKBMAlloc.c b/nx-X11/lib/X11/XKBMAlloc.c index 5e77670af..2467a2024 100644 --- a/nx-X11/lib/X11/XKBMAlloc.c +++ b/nx-X11/lib/X11/XKBMAlloc.c @@ -300,7 +300,7 @@ XkbAddKeyType(XkbDescPtr xkb, } } } - if ((!map) || (!map->types) || (!map->num_types < XkbNumRequiredTypes)) { + if ((!map) || (!map->types) || (map->num_types < XkbNumRequiredTypes)) { tmp = XkbNumRequiredTypes + 1; if (XkbAllocClientMap(xkb, XkbKeyTypesMask, tmp) != Success) return NULL; |