mirror of
https://gitlab.freedesktop.org/xorg/lib/libx11.git
synced 2026-05-05 06:28:02 +02:00
XkbChangeTypesOfKey: verify newTypesIn is not null before using it
Based on xorg/xserver@97c9e6a713
Fixes: 8ba0ca32 ("Janitor: ansification, make distcheck, compiler warnings.")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/279>
This commit is contained in:
parent
48a1335cab
commit
88d1a84ca3
1 changed files with 2 additions and 2 deletions
|
|
@ -682,8 +682,8 @@ XkbChangeTypesOfKey(XkbDescPtr xkb,
|
|||
int width, nOldGroups, oldWidth, newTypes[XkbNumKbdGroups];
|
||||
|
||||
if ((!xkb) || (!XkbKeycodeInRange(xkb, key)) || (!xkb->map) ||
|
||||
(!xkb->map->types) || ((groups & XkbAllGroupsMask) == 0) ||
|
||||
(nGroups > XkbNumKbdGroups)) {
|
||||
(!xkb->map->types) || (!newTypesIn) ||
|
||||
((groups & XkbAllGroupsMask) == 0) || (nGroups > XkbNumKbdGroups)) {
|
||||
return BadMatch;
|
||||
}
|
||||
if (nGroups == 0) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue