curl-curl/lib/vssh
Joshua Rogers dae19dd94a
libssh2/sftp: fix resume corruption by avoiding O_APPEND with rresume
Opening the remote file with O_APPEND while attempting to resume causes
all writes to be forced to EOF on servers/implementations where O_APPEND
semantics override a prior seek(). As a result, sftp_seek64() is ignored
and the resumed data is appended, duplicating/corrupting the file.

Fix by:
- Using O_WRONLY (without O_APPEND) when resume_from > 0.
- Skipping the seek entirely if remote_append mode is requested.

Closes #18952
2025-10-09 08:30:23 +02:00
..
curl_path.c libssh2: clarify that sshp->path is always at least one byte 2025-10-06 13:57:19 +02:00
curl_path.h lib: include files using known path 2025-04-08 17:00:00 +02:00
libssh2.c libssh2/sftp: fix resume corruption by avoiding O_APPEND with rresume 2025-10-09 08:30:23 +02:00
libssh.c libssh/sftp: fix resume corruption by avoiding O_APPEND with rresume 2025-10-09 08:30:09 +02:00
ssh.h libssh2: clarify that sshp->path is always at least one byte 2025-10-06 13:57:19 +02:00