summaryrefslogtreecommitdiff
path: root/xkb
diff options
context:
space:
mode:
authorPauli Nieminen <ext-pauli.nieminen@nokia.com>2010-07-22 12:48:55 +0300
committerPeter Hutterer <peter.hutterer@who-t.net>2010-09-01 14:42:58 +1000
commit2475ef60977f6813dec74ef0837a5915b8a48bbc (patch)
tree1cc6e119ecc7e52628791d9972b33c7855c33140 /xkb
parent184ef0d35612d6ed0619283d376f04d9a904f47c (diff)
xkb: Fix NULL pointer dereference
xkb->names is dereferenced in else path too. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'xkb')
-rw-r--r--xkb/xkmread.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/xkb/xkmread.c b/xkb/xkmread.c
index 9eb86018e..b564195bc 100644
--- a/xkb/xkmread.c
+++ b/xkb/xkmread.c
@@ -686,7 +686,11 @@ int nRead=0;
if ((tmp=XkmGetCountedString(file,buf,100))<1)
return -1;
nRead+= tmp;
- if ((buf[0]!='\0')&&(xkb->names)) {
+
+ if (!xkb->names)
+ continue;
+
+ if (buf[0]!='\0') {
Atom name;
name= XkbInternAtom(buf,0);
xkb->names->groups[i]= name;