]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Curl_ssh_connect() was using an uninitialized variable in one location.
authorJames Housley <jim@thehousleys.net>
Sat, 16 Jun 2007 16:58:02 +0000 (16:58 +0000)
committerJames Housley <jim@thehousleys.net>
Sat, 16 Jun 2007 16:58:02 +0000 (16:58 +0000)
Caught by the auto-builds

lib/ssh.c

index 4048744b4f55a9980109707f30704cf2b06e00e7..ff6d4e40addd43d9847e6ad62bcfad4c682076cd 100644 (file)
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -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);