From: Nikos Mavrogiannopoulos Date: Mon, 4 Dec 2017 08:24:06 +0000 (+0100) Subject: libssh: fixed dereference in statvfs access X-Git-Tag: curl-7_58_0~111 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2149%2Fhead;p=thirdparty%2Fcurl.git libssh: fixed dereference in statvfs access The behavior is now equivalent to ssh.c when SSH_SFTP_QUOTE_STATVFS handling fails. Fixes #2142 --- diff --git a/lib/ssh-libssh.c b/lib/ssh-libssh.c index 1277324bfa..23f28dca44 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"