From 0f3f5a36d5fc6dc53f69f48a0c83aef6a1fcf381 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 28 May 2013 15:52:34 +1000 Subject: 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 --- 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); -- cgit v1.2.3