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
|
@ -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…
Reference in New Issue
Block a user