mirror of
https://github.com/curl/curl.git
synced 2026-05-16 16:36:20 +03:00
ftp: avoid accessing EPSV response one byte past the NULL
If the response is just a single "(".
Reported-by: Andrew Nesbit
Closes #21545
This commit is contained in:
parent
67ce672842
commit
6f1dfab6a2
1 changed files with 1 additions and 1 deletions
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue