summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--src/xkbout.c11
2 files changed, 10 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 83b613a..467de34 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,9 @@
* src/maprules.c:
Fix signed vs unsigned char hilarity. (Bill Crawford)
+ * src/xkbout.c:
+ Coverity #982: Fix potential NULL dereference.
+
2006-03-27 Daniel Stone <daniel@freedesktop.org>
* configure.ac:
diff --git a/src/xkbout.c b/src/xkbout.c
index b69fdfb..7f8c8b5 100644
--- a/src/xkbout.c
+++ b/src/xkbout.c
@@ -392,10 +392,8 @@ XkbServerMapPtr srv;
Bool showActions;
xkb= result->xkb;
- map= xkb->map;
- srv= xkb->server;
- dpy= xkb->dpy;
- if ((!xkb)||(!map)||(!map->syms)||(!map->key_sym_map)) {
+
+ if ((!xkb)||(!xkb->map)||(!xkb->map->syms)||(!xkb->map->key_sym_map)) {
_XkbLibError(_XkbErrMissingSymbols,"XkbWriteXKBSymbols",0);
return False;
}
@@ -403,6 +401,11 @@ Bool showActions;
_XkbLibError(_XkbErrMissingNames,"XkbWriteXKBSymbols",0);
return False;
}
+
+ map= xkb->map;
+ srv= xkb->server;
+ dpy= xkb->dpy;
+
if ((xkb->names==NULL)||(xkb->names->symbols==None))
fprintf(file,"xkb_symbols {\n\n");
else fprintf(file,"xkb_symbols \"%s\" {\n\n",