diff options
author | Alexander Larsson <alexl@redhat.com> | 2009-03-10 15:57:26 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2009-03-10 15:57:26 +0000 |
commit | aa23c1920f5ecd3a759de1612d3b4de017c3b372 (patch) | |
tree | 8deb0f5ffc9c031f7c6fcec67f352e9a20043f8b | |
parent | 317be8c5e145c3fa8d786f18cc5a4daf309fe6cf (diff) | |
download | gvfs-aa23c1920f5ecd3a759de1612d3b4de017c3b372.tar.gz |
Bug 574754 – 100% cpu usage when connecting to a ssh key and denying key
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.
svn path=/trunk/; revision=2316
-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); |