]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
libssh: return the proper error for readdir problems
authorDaniel Stenberg <daniel@haxx.se>
Sun, 19 Oct 2025 09:24:46 +0000 (11:24 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 19 Oct 2025 12:28:55 +0000 (14:28 +0200)
The code would return without setting sshc->actualcode or returning the
CURLcode error.

Reported by ZeroPath
Closes #19135

lib/vssh/libssh.c

index 3741db20dc63e1e736528c1bbec9d3eaed5caf45..e2574b68176be2dbb87274f6783b6491f28704b3 100644 (file)
@@ -613,6 +613,7 @@ static int myssh_in_SFTP_READDIR(struct Curl_easy *data,
 
       if(result) {
         myssh_to(data, sshc, SSH_STOP);
+        sshc->actualcode = result;
         return SSH_NO_ERROR;
       }