[PATCH libxkbfile 09/12] Fix possible NULL pointer dereference
Pauli Nieminen
ext-pauli.nieminen at nokia.com
Wed Jul 21 05:02:53 PDT 2010
xkb->names is NULL checked in previous if but then dereferenced
unconditionaly.
Signed-off-by: Pauli Nieminen <ext-pauli.nieminen at nokia.com>
---
src/xkmout.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/xkmout.c b/src/xkmout.c
index d4bebd3..f32194c 100644
--- a/src/xkmout.c
+++ b/src/xkmout.c
@@ -550,7 +550,7 @@ unsigned tmp,size= 0;
else name= NULL;
size+= xkmPutCountedString(file,name);
for (tmp=i=0;i<XkbNumKbdGroups;i++) {
- if (xkb->names->groups[i]!=None)
+ if (xkb->names && xkb->names->groups[i]!=None)
tmp|= (1<<i);
}
size+= xkmPutCARD8(file,xkb->min_key_code);
--
1.6.3.3
More information about the xorg-devel
mailing list