summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2011-08-22 10:45:06 +1200
committerRobert Ancell <robert.ancell@canonical.com>2011-08-22 10:45:06 +1200
commit0301244294c1b2ab062937390053a4a678a5251d (patch)
tree609f7a7f951b7b2528b2c5aa124e5e312efa2b46
parent2584b255009f3f36358425c74549175a11a57008 (diff)
parentb91c0d380a7774f601e7016af99d35c415e84675 (diff)
downloadlightdm-git-lightdm-0.9.4.tar.gz
Fix crash when failing to write X authoritylightdm-0.9.4
-rw-r--r--NEWS1
-rw-r--r--src/xauthority.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index f9639438..ff011205 100644
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,7 @@ Overview of changes in lightdm 0.9.4
* Fix bug where sessions used the seat bus name
* Don't allow autologin-username to be set to empty
* Fix bug where PAM session was not opened before writing to home directory
+ * Fix crash when failing to write X authority
Overview of changes in lightdm 0.9.3
diff --git a/src/xauthority.c b/src/xauthority.c
index ba770c62..837ee448 100644
--- a/src/xauthority.c
+++ b/src/xauthority.c
@@ -206,13 +206,13 @@ write_uint16 (GOutputStream *stream, guint16 value, GError **error)
data[0] = value >> 8;
data[1] = value & 0xFF;
- return g_output_stream_write (stream, data, 2, NULL, error);
+ return g_output_stream_write (stream, data, 2, NULL, error) >= 0;
}
static gboolean
write_data (GOutputStream *stream, const guint8 *data, gsize data_length, GError **error)
{
- return g_output_stream_write (stream, data, data_length, NULL, error);
+ return g_output_stream_write (stream, data, data_length, NULL, error) >= 0;
}
static gboolean