[PATCH 19/32] [libx11] Variable "entry" tracked as NULL was dereferenced.
Erkki Seppälä
erkki.seppala at vincit.fi
Wed Jan 26 23:54:02 PST 2011
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
More information about the xorg-devel
mailing list