mirror of
https://github.com/curl/curl.git
synced 2026-07-24 15:47:16 +03:00
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
This commit is contained in:
parent
19d6415273
commit
9b523773b8
1 changed files with 4 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue