summaryrefslogtreecommitdiff
path: root/xkb
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2017-10-09 17:14:32 -0700
committerPeter Hutterer <peter.hutterer@who-t.net>2017-11-01 10:29:00 +1000
commit14af8bee242fe40af0e91c61465d6720aaa60e97 (patch)
tree704ec62e9dd510a4afc76f66456db7758b966f61 /xkb
parent5aad81445c8c3d6b7b30d503cfe26027fa482870 (diff)
downloadxserver-14af8bee242fe40af0e91c61465d6720aaa60e97.tar.gz
test: Add a test for the overflow bug in bigreqs.
The failing struct comes from the python test written by Michal Srb <msrb@suse.com>. v2: Use a drawable (root window) and gc, so that PolyLines hopefully actually tries processing things. However, the request seems to process successfully so the poll() just stalls out. However, this does let us distinguish between detecting the bigrequests error and not, at least. v3: Clean up the description of what we expect the poll() call to do. v4: Use XI2 instead of PolyLine to trigger a predictable error. We know the server replies with BadValue for a zero num_masks argument. So if we send a bigreq with a num_masks 0 and a length 0, we can just check whether we get killed (good) or a BadValue (bad). It doesn't test for specific memory overflows or crashes, but based on the assumption that we shouldn't look at *any* BigReq of size 0, this seems to be sufficient. Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'xkb')
0 files changed, 0 insertions, 0 deletions