mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-02 11:58:03 +02:00
dix: build_modmap_from_modkeymap needs to bounds-check its argument.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Daniel Stone <daniel@fooishbar.org>
This commit is contained in:
parent
45baef0b77
commit
e3c1096273
1 changed files with 3 additions and 0 deletions
|
|
@ -235,6 +235,9 @@ static int build_modmap_from_modkeymap(CARD8 *modmap, KeyCode *modkeymap,
|
|||
if (!modkeymap[i])
|
||||
continue;
|
||||
|
||||
if (modkeymap[i] >= MAP_LENGTH)
|
||||
return BadValue;
|
||||
|
||||
if (modmap[modkeymap[i]])
|
||||
return BadValue;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue