summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--src/xkbout.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index b65e2ed..37084ba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,10 @@
* src/xkbtext.c:
Coverity #776, 777: Fix memory leaks.
+ * src/xkbout.c:
+ Coverity #774: Fix memory leak.
+ Coverity #265: Fix potential NULL dereference.
+
2006-04-07 Daniel Stone <daniel@freedesktop.org>
* src/maprules.c:
diff --git a/src/xkbout.c b/src/xkbout.c
index a5593fa..e5ada51 100644
--- a/src/xkbout.c
+++ b/src/xkbout.c
@@ -778,7 +778,7 @@ int dfltKeyColor = 0;
fprintf(file," angle= %s;\n",
XkbGeomFPText(s->angle,XkbXKBFile));
}
- for (i=0,row=s->rows;i<s->num_rows;i++,row++) {
+ for (i=0,row=s->rows;row&&i<s->num_rows;i++,row++) {
fprintf(file," row {\n");
fprintf(file," top= %s;\n",
XkbGeomFPText(row->top,XkbXKBFile));