diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-12-23 12:54:14 +1000 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2009-12-22 21:30:52 -0800 |
commit | 90e6d93cf9bfafd63d7849dc16ce194d6f9c9d5f (patch) | |
tree | c06f4698904644dddf2eb6aaf02485f140b11863 /test/xi2 | |
parent | 72286eae9f4a2f2ca6c46919ff8aa1011429e03a (diff) |
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>
Diffstat (limited to 'test/xi2')
-rw-r--r-- | test/xi2/protocol-eventconvert.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/xi2/protocol-eventconvert.c b/test/xi2/protocol-eventconvert.c index 66686cb1c..f20a10a57 100644 --- a/test/xi2/protocol-eventconvert.c +++ b/test/xi2/protocol-eventconvert.c @@ -736,6 +736,9 @@ static void test_values_XIDeviceChangedEvent(DeviceChangedEvent *in, } break; + default: + g_error("Invalid class type.\n"); + break; } ptr += any->length * 4; |