Skip to content
Snippets Groups Projects
Commit b61b420c authored by James Housley's avatar James Housley
Browse files

Curl_ssh_connect() was using an uninitialized variable in one location.

Caught by the auto-builds
parent b0aa11fd
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment