diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | daemon/gvfsbackendsftp.c | 9 |
2 files changed, 16 insertions, 0 deletions
@@ -1,5 +1,12 @@ 2009-03-10 Alexander Larsson <alexl@redhat.com> + Bug 574754 – 100% cpu usage when connecting to a ssh key and denying key access + + * daemon/gvfsbackendsftp.c (read_reply_sync): + Make sure we handle ssh exiting early. + +2009-03-10 Alexander Larsson <alexl@redhat.com> + * configure.ac: Post release version bump diff --git a/daemon/gvfsbackendsftp.c b/daemon/gvfsbackendsftp.c index 253277ab..c115b849 100644 --- a/daemon/gvfsbackendsftp.c +++ b/daemon/gvfsbackendsftp.c @@ -560,6 +560,15 @@ read_reply_sync (GVfsBackendSftp *backend, gsize *len_out, GError **error) &bytes_read, NULL, error)) return NULL; + /* Make sure we handle ssh exiting early, e.g. if no further + authentication methods */ + if (bytes_read == 0) + { + g_set_error_literal (error, + G_IO_ERROR, G_IO_ERROR_FAILED, + _("ssh program unexpectedly exited")); + return NULL; + } len = GUINT32_FROM_BE (len); |