Ticket #100 (closed defect)
libssh2_scp_send() does not support files >4GB
|Reported by:||p82420||Owned by:||bagder|
Note: I'm using Solaris 9/10, libssh2 1.1
The 4th parameter of libssh2_scp_send() is of type size_t. With the ILP32 (default) model, size_t is 32-bits wide. That makes impossible to transfer files larger than 4GB. I've not tested the LP64 model (accessible with -m64 on Sun Studio and probably gcc), but that should work. Nevertheless, size_t is not the appropriate C type for file sizes. POSIX uses off_t, which is either long long (-D_FILE_OFFSET_BITS=64 or LP64 model) or long.
See attached patch (I've used the off_t C type, but fill free to use any 64-bit wide type).