(!1981) Xi: exevents: NULL protection in ‘DeviceEventSuppressForWindow()
Protect against `inputMasks` could be NULL. | ../Xi/exevents.c: In function ‘DeviceEventSuppressForWindow’: | ../Xi/exevents.c:3246:32: warning: dereference of NULL ‘inputMasks’ [CWE-476] [-Wanalyzer-null-dereference] | 3246 | FreeResource(inputMasks->inputClients->resource, X11_RESTYPE_NONE); | | ~~~~~~~~~~^~~~~~~~~~~~~~ Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
faed002022
commit
a66426d7ea
|
@ -3241,8 +3241,11 @@ DeviceEventSuppressForWindow(WindowPtr pWin, ClientPtr client, Mask mask,
|
|||
inputMasks->dontPropagateMask[maskndx] = mask;
|
||||
}
|
||||
RecalculateDeviceDeliverableEvents(pWin);
|
||||
if (ShouldFreeInputMasks(pWin, FALSE))
|
||||
if (ShouldFreeInputMasks(pWin, FALSE)) {
|
||||
BUG_RETURN_VAL(!inputMasks, BadImplementation);
|
||||
BUG_RETURN_VAL(!inputMasks->inputClients, BadImplementation);
|
||||
FreeResource(inputMasks->inputClients->resource, X11_RESTYPE_NONE);
|
||||
}
|
||||
return Success;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue