diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2011-08-22 10:45:06 +1200 |
---|---|---|
committer | Robert Ancell <robert.ancell@canonical.com> | 2011-08-22 10:45:06 +1200 |
commit | 0301244294c1b2ab062937390053a4a678a5251d (patch) | |
tree | 609f7a7f951b7b2528b2c5aa124e5e312efa2b46 | |
parent | 2584b255009f3f36358425c74549175a11a57008 (diff) | |
parent | b91c0d380a7774f601e7016af99d35c415e84675 (diff) | |
download | lightdm-git-lightdm-0.9.4.tar.gz |
Fix crash when failing to write X authoritylightdm-0.9.4
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/xauthority.c | 4 |
2 files changed, 3 insertions, 2 deletions
@@ -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 |