[PATCH] XKB: Fix garbage initialization
Peter Hutterer
peter.hutterer at who-t.net
Tue Mar 23 15:08:12 PDT 2010
On Tue, Mar 23, 2010 at 10:37:36AM -0700, Jeremy Huddleston wrote:
>
> XkbEnableDisableControls set extra garbage bits on the xkbControlsNotify
> changedControls mask because it was uninitialized on the stack.
>
> Found by clang
>
> Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
> ---
> xkb/xkbUtils.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
> index 5b317c9..e287997 100644
> --- a/xkb/xkbUtils.c
> +++ b/xkb/xkbUtils.c
> @@ -753,7 +753,7 @@ XkbSrvLedInfoPtr sli;
> if (cause!=NULL) {
> xkbControlsNotify cn;
> cn.numGroups= ctrls->num_groups;
> - cn.changedControls|= XkbControlsEnabledMask;
> + cn.changedControls= XkbControlsEnabledMask;
> cn.enabledControls= ctrls->enabled_ctrls;
> cn.enabledControlChanges= (ctrls->enabled_ctrls^old);
> cn.keycode= cause->kc;
> --
> 1.6.2
>
I've merged this into my tree, thanks.
Cheers,
Peter
More information about the xorg-devel
mailing list