[PATCH] xkb: check for NULL pointer before dereferences it in XkbWriteXKBSymbols

Tiago Vignatti tiago.vignatti at nokia.com
Fri Apr 16 08:42:25 PDT 2010


Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
---
 xkb/xkbout.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/xkb/xkbout.c b/xkb/xkbout.c
index 68ede90..084d72b 100644
--- a/xkb/xkbout.c
+++ b/xkb/xkbout.c
@@ -353,9 +353,12 @@ XkbClientMapPtr		map;
 XkbServerMapPtr		srv;
 Bool			showActions;
 
+    if (!xkb)
+	return FALSE;
+
     map= xkb->map;
     srv= xkb->server;
-    if ((!xkb)||(!map)||(!map->syms)||(!map->key_sym_map)) {
+    if ((!map)||(!map->syms)||(!map->key_sym_map)) {
 	_XkbLibError(_XkbErrMissingSymbols,"XkbWriteXKBSymbols",0);
 	return FALSE;
     }
-- 
1.6.0.4



More information about the xorg-devel mailing list