mirror of
https://github.com/curl/curl.git
synced 2026-07-24 16:07:16 +03:00
Curl_ssh_connect() was using an uninitialized variable in one location.
Caught by the auto-builds
This commit is contained in:
parent
b0aa11fde7
commit
b61b420cb8
1 changed files with 2 additions and 2 deletions
|
|
@ -1005,8 +1005,8 @@ CURLcode Curl_ssh_connect(struct connectdata *conn, bool *done)
|
|||
/*
|
||||
* Get the "home" directory
|
||||
*/
|
||||
if (libssh2_sftp_realpath(ssh->sftp_session, ".", tempHome, PATH_MAX-1)
|
||||
> 0) {
|
||||
i = libssh2_sftp_realpath(ssh->sftp_session, ".", tempHome, PATH_MAX-1);
|
||||
if (i > 0) {
|
||||
/* It seems that this string is not always NULL terminated */
|
||||
tempHome[i] = '\0';
|
||||
ssh->homedir = (char *)strdup(tempHome);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue