[PATCH] xkb: check for NULL pointer before dereferences it in XkbWriteXKBSymbols

Alan Coopersmith alan.coopersmith at oracle.com
Mon Apr 19 16:52:53 PDT 2010


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)) {

But you're still dereferencing xkb->map before checking xkb is not NULL.

-- 
	-Alan Coopersmith-        alan.coopersmith at oracle.com
	 Oracle Solaris Platform Engineering: X Window System



More information about the xorg-devel mailing list