summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Housley <jim@thehousleys.net>2007-06-16 16:58:02 +0000
committerJames Housley <jim@thehousleys.net>2007-06-16 16:58:02 +0000
commitb61b420cb814a142f4778b2926b33bddfe36a3e0 (patch)
treebe88f624672771382ccec704198165c9ec92d741
parentb0aa11fde7da951e3a0a4746fbc2601b02d2888c (diff)
downloadgnurl-b61b420cb814a142f4778b2926b33bddfe36a3e0.tar.gz
gnurl-b61b420cb814a142f4778b2926b33bddfe36a3e0.tar.bz2
gnurl-b61b420cb814a142f4778b2926b33bddfe36a3e0.zip
Curl_ssh_connect() was using an uninitialized variable in one location.
Caught by the auto-builds
-rw-r--r--lib/ssh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ssh.c b/lib/ssh.c
index 4048744b4..ff6d4e40a 100644
--- 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);