[gconf] kill a SEGV if saved_state has blank lines in it.
- From: Michael Meeks <michael src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gconf] kill a SEGV if saved_state has blank lines in it.
- Date: Thu, 22 Apr 2010 12:54:50 +0000 (UTC)
commit 2f65528b0f023c3388cf242d7caf2a18121eb107
Author: Michael Meeks <michael meeks novell com>
Date: Thu Apr 22 13:54:47 2010 +0100
kill a SEGV if saved_state has blank lines in it.
gconf/gconfd.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gconf/gconfd.c b/gconf/gconfd.c
index 38a8423..66c18ff 100644
--- a/gconf/gconfd.c
+++ b/gconf/gconfd.c
@@ -2233,7 +2233,7 @@ read_line (FILE *f)
}
len = strlen (buf);
- if (buf[len - 1] == '\n')
+ if (len > 0 && buf[len - 1] == '\n')
buf[--len] = '\0';
if (retval == NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]