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