Commit 90e6d93c authored by Peter Hutterer's avatar Peter Hutterer Committed by Keith Packard
Browse files

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's avatarPeter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
parent 72286eae
......@@ -736,6 +736,9 @@ static void test_values_XIDeviceChangedEvent(DeviceChangedEvent *in,
}
break;
default:
g_error("Invalid class type.\n");
break;
}
ptr += any->length * 4;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment