[gdm] greeter: fix version display when release file is empty
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] greeter: fix version display when release file is empty
- Date: Tue, 7 Dec 2010 14:08:03 +0000 (UTC)
commit 4620ebc29cd7d53987af4b834db7668e93ce3b85
Author: Ionut Biru <ibiru archlinux org>
Date: Mon Dec 6 17:44:44 2010 -0800
greeter: fix version display when release file is empty
If fgets returns NULL then we need to fail gracefully rather than use
an uninitialized buffer.
Signed-off-by: Ionut Biru <ibiru archlinux org>
gui/simple-greeter/gdm-greeter-login-window.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gui/simple-greeter/gdm-greeter-login-window.c b/gui/simple-greeter/gdm-greeter-login-window.c
index ca170a5..0823a3c 100644
--- a/gui/simple-greeter/gdm-greeter-login-window.c
+++ b/gui/simple-greeter/gdm-greeter-login-window.c
@@ -1096,6 +1096,7 @@ file_read_one_line (const char *filename)
if (fgets (buf, sizeof (buf), f) == NULL) {
g_warning ("Unable to read from file %s", filename);
+ goto out;
}
line = g_strdup (buf);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]