mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-06 01:30:13 +01: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>
(cherry picked from commit 8861407878)
This commit is contained in:
parent
441673906f
commit
d55009f87f
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