summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2013-05-28 15:52:34 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2013-06-27 05:37:18 +1000
commit0f3f5a36d5fc6dc53f69f48a0c83aef6a1fcf381 (patch)
tree558e9306004c7d4ab683dd728c3917efb3281ddf
parent35ae16dc2f16b24a22625b2d9f76a2128b673a6c (diff)
If the XGetDeviceDontPropagateList reply has an invalid length, return 0
If we skip over the reply data, return 0 as number of event classes. Follow-up to 6dd6dc51a2935c72774be81e5cc2ba2c30e9feff. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/XGetProp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/XGetProp.c b/src/XGetProp.c
index b49328c..8c69ef2 100644
--- a/src/XGetProp.c
+++ b/src/XGetProp.c
@@ -104,8 +104,10 @@ XGetDeviceDontPropagateList(
_XRead(dpy, (char *)(&ec), sizeof(CARD32));
list[i] = (XEventClass) ec;
}
- } else
+ } else {
+ *count = 0;
_XEatDataWords(dpy, rep.length);
+ }
}
UnlockDisplay(dpy);