[PATCH] xkb: check for NULL pointer before dereferences it in XkbWriteXKBSymbols
Jeremy Huddleston
jeremyhu at freedesktop.org
Wed Apr 21 12:19:02 PDT 2010
Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
On Apr 19, 2010, at 10:58, Tiago Vignatti wrote:
> just moved the srv assignment to before it's being used.
> ---
> xkb/xkbout.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/xkb/xkbout.c b/xkb/xkbout.c
> index 68ede90..9daac9a 100644
> --- a/xkb/xkbout.c
> +++ b/xkb/xkbout.c
> @@ -354,7 +354,6 @@ XkbServerMapPtr srv;
> Bool showActions;
>
> map= xkb->map;
> - srv= xkb->server;
> if ((!xkb)||(!map)||(!map->syms)||(!map->key_sym_map)) {
> _XkbLibError(_XkbErrMissingSymbols,"XkbWriteXKBSymbols",0);
> return FALSE;
> @@ -376,6 +375,7 @@ Bool showActions;
> }
> if (tmp>0)
> fprintf(file,"\n");
> + srv= xkb->server;
> for (i=xkb->min_key_code;i<=xkb->max_key_code;i++) {
> Bool simple;
> if ((int)XkbKeyNumSyms(xkb,i)<1)
> --
> 1.6.0.4
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
More information about the xorg-devel
mailing list