aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2006-03-09 11:25:15 +0000
committerMiklos Szeredi <miklos@szeredi.hu>2006-03-09 11:25:15 +0000
commit326ff7f97e3a44cf485ae1450189bdad85c927f7 (patch)
tree3dd477bd46f6f6de68af7470b16ef184e9d68b65
parent7f4eaea507b832e39317cb612274bf81526b1f60 (diff)
downloadsshfs-326ff7f97e3a44cf485ae1450189bdad85c927f7.tar
sshfs-326ff7f97e3a44cf485ae1450189bdad85c927f7.tar.gz
sshfs-326ff7f97e3a44cf485ae1450189bdad85c927f7.tar.bz2
sshfs-326ff7f97e3a44cf485ae1450189bdad85c927f7.zip
fix
-rw-r--r--ChangeLog4
-rw-r--r--sshfs.c4
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 8c203b1..2fdf5a6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-03-09 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix segfault if remote host is down and reconnection is enabled
+
2006-03-08 Miklos Szeredi <miklos@szeredi.hu>
* Fix bug in symlink transformation. Reported by Ralf Hoffmann
diff --git a/sshfs.c b/sshfs.c
index 636b856..944c454 100644
--- a/sshfs.c
+++ b/sshfs.c
@@ -999,9 +999,9 @@ static int sftp_init()
uint8_t type;
uint32_t version;
struct buffer buf;
+ buf_init(&buf, 0);
if (sftp_send_iov(SSH_FXP_INIT, PROTO_VERSION, NULL, 0) == -1)
goto out;
- buf_init(&buf, 0);
if (sftp_read(&type, &buf) == -1)
goto out;
if (type != SSH_FXP_VERSION) {
@@ -1249,6 +1249,8 @@ static int sftp_request_send(uint8_t type, struct iovec *iov, size_t count,
req->error = err;
if (!want_reply)
sftp_request_wait(req, type, 0, NULL);
+ else
+ *reqp = req;
return err;
}