From: Jay Satiro Date: Mon, 10 Mar 2025 02:20:01 +0000 (-0400) Subject: libssh: fix scp large file upload for 32-bit size_t systems X-Git-Tag: curl-8_13_0~189 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b523773b8a1d59939c15688a90796af91fffd6e;p=thirdparty%2Fcurl.git libssh: fix scp large file upload for 32-bit size_t systems - Use ssh_scp_push_file64 instead of ssh_scp_push_file. The former uses uint64_t for file size and the latter uses size_t which may be 32-bit. Ref: https://github.com/curl/curl/pull/16194 Closes https://github.com/curl/curl/pull/16641 --- diff --git a/lib/vssh/libssh.c b/lib/vssh/libssh.c index d0480576b5..922fc11dde 100644 --- a/lib/vssh/libssh.c +++ b/lib/vssh/libssh.c @@ -1814,9 +1814,10 @@ static CURLcode myssh_statemach_act(struct Curl_easy *data, bool *block) break; } - rc = ssh_scp_push_file(sshc->scp_session, protop->path, - (size_t)data->state.infilesize, - (int)data->set.new_file_perms); + rc = ssh_scp_push_file64(sshc->scp_session, protop->path, + (uint64_t)data->state.infilesize, + (int)data->set.new_file_perms); + if(rc != SSH_OK) { err_msg = ssh_get_error(sshc->ssh_session); failf(data, "%s", err_msg);