mirror of
https://gitlab.freedesktop.org/xorg/lib/libx11.git
synced 2026-05-07 20:18:03 +02:00
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>
This commit is contained in:
parent
ff9a5c1992
commit
1e362fac92
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue