[PATCH 19/32] [libx11] Variable "entry" tracked as NULL was dereferenced.
Dirk Wallenstein
halsmit at t-online.de
Thu Jan 27 04:26:12 PST 2011
On Thu, Jan 27, 2011 at 09:54:02AM +0200, Erkki Seppälä wrote:
> Check entry for non-nullness before dereferencing it
>
> Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira at nokia.com>
> Signed-off-by: Erkki Seppälä <erkki.seppala at vincit.fi>
> ---
> src/xkb/XKB.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/xkb/XKB.c b/src/xkb/XKB.c
> index 42dba99..f926cb9 100644
> --- a/src/xkb/XKB.c
> +++ b/src/xkb/XKB.c
> @@ -462,7 +462,7 @@ XkbKTMapEntryPtr entry = NULL;
> if (map_rtrn!=NULL) {
> bzero(map_rtrn,type->mods.mask+1);
> for (i=0;i<type->map_count;i++) {
> - if (entry->active) {
> + if (entry && entry->active) {
> map_rtrn[type->map[i].mods.mask]= type->map[i].level;
> }
> }
> --
> 1.7.0.4
>
Reviewed-by: Dirk Wallenstein <halsmit at t-online.de>
--
Greetings,
Dirk
More information about the xorg-devel
mailing list