From 651ab789f500166a8360910ee0b8cfe340b94443 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Mon, 2 Mar 2009 10:21:58 +0000 Subject: =?UTF-8?q?Bug=20569203=20=E2=80=93=20gvfsd-sftp=20crashed=20with?= =?UTF-8?q?=20SIGSEGV=20in=20strlen()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2009-03-02 Alexander Larsson 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 --- daemon/gvfsbackendsftp.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'daemon/gvfsbackendsftp.c') 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, -- cgit v1.2.1