Fix possible NULL dereference in XkbFlushLedEvents()
Through some code paths it is possible that NULL is being passed in the 'ed' parameter to XkbFlushLedEvents(). Make sure we don't pass it along to bzero(). Signed-off-by: Tomas Carnecky <tom@dbservice.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
92d9cb7e13
commit
8861407878
|
@ -745,12 +745,14 @@ XkbFlushLedEvents( DeviceIntPtr dev,
|
|||
XkbDDXAccessXBeep(dev, _BEEP_LED_OFF, XkbAccessXFeedbackMask);
|
||||
}
|
||||
}
|
||||
if (ed && (ed->reason)) {
|
||||
if ((dev!=kbd)&&(ed->reason&XkbXI_IndicatorStateMask))
|
||||
XkbDDXUpdateDeviceIndicators(dev,sli,sli->effectiveState);
|
||||
XkbSendExtensionDeviceNotify(dev,cause->client,ed);
|
||||
if (ed) {
|
||||
if (ed->reason) {
|
||||
if ((dev!=kbd)&&(ed->reason&XkbXI_IndicatorStateMask))
|
||||
XkbDDXUpdateDeviceIndicators(dev,sli,sli->effectiveState);
|
||||
XkbSendExtensionDeviceNotify(dev,cause->client,ed);
|
||||
}
|
||||
bzero((char *)ed,sizeof(XkbExtensionDeviceNotify));
|
||||
}
|
||||
bzero((char *)ed,sizeof(XkbExtensionDeviceNotify));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue