← Commit list

6d0fcdf2ed

Daniel Stenberg
Daniel Stenberg
2025-10-13
SUCCESS Duration: 188s

Subject

libssh: catch a resume point larger than the size

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/vssh/libssh.c+4 -0
@@ -1239,6 +1239,10 @@ static int myssh_in_UPLOAD_INIT(struct Curl_easy *data,
/* now, decrease the size of the read */
if(data->state.infilesize > 0) {
+ if(data->state.resume_from > data->state.infilesize) {
+ failf(data, "Resume point beyond size");
+ return myssh_to_ERROR(data, sshc, CURLE_BAD_FUNCTION_ARGUMENT);
+ }
data->state.infilesize -= data->state.resume_from;
data->req.size = data->state.infilesize;
Curl_pgrsSetUploadSize(data, data->state.infilesize);