[gconf/gnome-2-28] 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/gnome-2-28] kill a SEGV if saved_state has blank lines in it.
- Date: Thu, 22 Apr 2010 12:53:37 +0000 (UTC)
commit d2d84a388a9d43849a72917e31c8c37880690795
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]