mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-05 06:28:07 +02:00
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
1 changed files with 7 additions and 5 deletions
|
|
@ -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…
Add table
Reference in a new issue