mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00: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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user