[PATCH libxkbfile 05/12] Fix NULL pointer dereference

Pauli Nieminen ext-pauli.nieminen at nokia.com
Wed Jul 21 05:02:49 PDT 2010


Signed-off-by: Pauli Nieminen <ext-pauli.nieminen at nokia.com>
---
 src/xkmread.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/xkmread.c b/src/xkmread.c
index 96641d2..573c862 100644
--- a/src/xkmread.c
+++ b/src/xkmread.c
@@ -622,7 +622,11 @@ XkbDescPtr		xkb;
 	    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(xkb->dpy,buf,0);
 		xkb->names->groups[i]= name;
-- 
1.6.3.3



More information about the xorg-devel mailing list