[PATCH libXi 3/3] If the XGetDeviceDontPropagateList reply has an invalid length, return 0
Peter Hutterer
peter.hutterer at who-t.net
Mon May 27 22:52:34 PDT 2013
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 at who-t.net>
---
src/XGetProp.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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);
--
1.8.1.4
More information about the xorg-devel
mailing list