From 990a23bb97915567415d5857ee6d862a1528f1af Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 19 Oct 2025 11:24:46 +0200 Subject: [PATCH] libssh: return the proper error for readdir problems The code would return without setting sshc->actualcode or returning the CURLcode error. Reported by ZeroPath Closes #19135 --- lib/vssh/libssh.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/vssh/libssh.c b/lib/vssh/libssh.c index 3741db20dc..e2574b6817 100644 --- a/lib/vssh/libssh.c +++ b/lib/vssh/libssh.c @@ -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; }