-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Tomas Carnecky wrote: > 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 <t...@dbservice.com> > --- > xkb/xkbLEDs.c | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/xkb/xkbLEDs.c b/xkb/xkbLEDs.c > index 59cdba4..dfdd5a2 100644 > --- a/xkb/xkbLEDs.c > +++ b/xkb/xkbLEDs.c > @@ -750,7 +750,8 @@ XkbFlushLedEvents( DeviceIntPtr > dev, > XkbDDXUpdateDeviceIndicators(dev,sli,sli->effectiveState); > XkbSendExtensionDeviceNotify(dev,cause->client,ed); > } > - bzero((char *)ed,sizeof(XkbExtensionDeviceNotify)); > + if (ed) > + bzero((char *)ed,sizeof(XkbExtensionDeviceNotify));
Since the preceding if-statement is "if (ed && (ed->reason))", I think it would be more clear to restructure the code as: 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)); } Signed-off-by: Ian Romanick <ian.d.roman...@intel.com> > return; > } > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAksqfssACgkQX1gOwKyEAw8WAACdEfWfUrVNnIKwCjDJzwrcyHVB xA8AnR6eJ6nbHGEgeodaVdtLX+5AIa4d =NlaA -----END PGP SIGNATURE----- _______________________________________________ xorg-devel mailing list xorg-devel@lists.x.org http://lists.x.org/mailman/listinfo/xorg-devel