mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-02 00:40:09 +01:00
test/xi2: fail if xi2 class type is garbage. (#25492)
If the keycode range exceeds the allowable length, memory gets overwritten. Catch this case by making sure that only allowed class types are present. X.Org Bug 25492 <http://bugs.freedesktop.org/show_bug.cgi?id=25492> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
72286eae9f
commit
90e6d93cf9
1 changed files with 3 additions and 0 deletions
|
|
@ -736,6 +736,9 @@ static void test_values_XIDeviceChangedEvent(DeviceChangedEvent *in,
|
|||
|
||||
}
|
||||
break;
|
||||
default:
|
||||
g_error("Invalid class type.\n");
|
||||
break;
|
||||
}
|
||||
|
||||
ptr += any->length * 4;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue