← Commit list

6f1dfab6a2

Daniel Stenberg
Daniel Stenberg
2026-05-11
SUCCESS Duration: 222s

Subject

ftp: avoid accessing EPSV response one byte past the NULL

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
@@ -2073,7 +2073,7 @@ static CURLcode ftp_state_pasv_resp(struct Curl_easy *data,
ptr++;
/* |||12345| */
sep = ptr[0];
- if((ptr[1] == sep) && (ptr[2] == sep) && ISDIGIT(ptr[3])) {
+ if(sep && (ptr[1] == sep) && (ptr[2] == sep) && ISDIGIT(ptr[3])) {
const char *p = &ptr[3];
curl_off_t num;
if(curlx_str_number(&p, &num, 0xffff) || (*p != sep)) {