From 91853075221767237c5864da25df5a9453858309 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Mon, 4 Dec 2017 09:24:06 +0100 Subject: [PATCH] libssh: fixed dereference in statvfs access The behavior is now equivalent to ssh.c when SSH_SFTP_QUOTE_STATVFS handling fails. Fixes #2142 --- lib/ssh-libssh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ssh-libssh.c b/lib/ssh-libssh.c index 1277324bf..23f28dca4 100644 --- a/lib/ssh-libssh.c +++ b/lib/ssh-libssh.c @@ -998,7 +998,7 @@ static CURLcode myssh_statemach_act(struct connectdata *conn, bool *block) sshc->actualcode = CURLE_QUOTE_ERROR; break; } - else { + else if (statvfs) { char *tmp = aprintf("statvfs:\n" "f_bsize: %llu\n" "f_frsize: %llu\n" "f_blocks: %llu\n" "f_bfree: %llu\n"