From 37b8d68832cfd6f20b321d9d7e757027c75677f2 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 6 Jul 2014 10:54:57 -0700 Subject: 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 Reviewed-by: Matthieu Herrb Signed-off-by: Alan Coopersmith Backported-to-NX-by: Ulrich Sibiller --- nx-X11/lib/X11/XKBMAlloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nx-X11') 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; -- cgit v1.2.3