← Commit list

9e3c35a88e

Daniel Stenberg
Daniel Stenberg
2025-10-06
SUCCESS Duration: 173s

Subject

ftp: fix the 213 scanner memchr buffer limit argument

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/ftp.c+1 -1
@@ -2319,7 +2319,7 @@ static CURLcode ftp_state_size_resp(struct Curl_easy *data,
for all the digits at the end of the response and parse only those as a
number. */
char *start = &buf[4];
- const char *fdigit = memchr(start, '\r', len);
+ const char *fdigit = memchr(start, '\r', len - 4);
if(fdigit) {
fdigit--;
if(*fdigit == '\n')