summaryrefslogtreecommitdiff
path: root/daemon/gvfsbackendsftp.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2009-03-02 10:21:58 +0000
committerAlexander Larsson <alexl@src.gnome.org>2009-03-02 10:21:58 +0000
commit651ab789f500166a8360910ee0b8cfe340b94443 (patch)
treef1a2da1f6fd8333918e72188c283546a75dd7d62 /daemon/gvfsbackendsftp.c
parentccca893c6923a9cdf32bfe07852001b5d0818fed (diff)
downloadgvfs-651ab789f500166a8360910ee0b8cfe340b94443.tar.gz
Bug 569203 – gvfsd-sftp crashed with SIGSEGV in strlen()
2009-03-02 Alexander Larsson <alexl@redhat.com> Bug 569203 – gvfsd-sftp crashed with SIGSEGV in strlen() * daemon/gvfsbackendsftp.c: Workaround crash, spew a warning to try to get information about this crash. svn path=/trunk/; revision=2266
Diffstat (limited to 'daemon/gvfsbackendsftp.c')
-rw-r--r--daemon/gvfsbackendsftp.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/daemon/gvfsbackendsftp.c b/daemon/gvfsbackendsftp.c
index 3e535528..5f6db5a7 100644
--- a/daemon/gvfsbackendsftp.c
+++ b/daemon/gvfsbackendsftp.c
@@ -903,7 +903,18 @@ handle_login (GVfsBackend *backend,
{
g_free (new_user);
}
-
+
+ if (new_password == NULL)
+ {
+ /* This really should not happen, but was seen as bug #569203
+ * avoid crash and ask for info
+ */
+ g_warning ("Got NULL password but no error in sftp login request. "
+ "This should not happen, if you can reproduce this, please "
+ "add information to http://bugzilla.gnome.org/show_bug.cgi?id=569203");
+ new_password = g_strdup ("");
+ }
+
if (!g_output_stream_write_all (reply_stream,
new_password, strlen (new_password),
&bytes_written,