mirror of https://github.com/moparisthebest/curl
ftp: avoid two unsigned int overflows in FTP listing parser
Curl_ftp_parselist: avoid unsigned integer overflows The overflow has no real world impact, just avoid it for "best practice". Closes #3225
This commit is contained in:
parent
fcf3f13368
commit
c05d77ee7d
|
@ -405,7 +405,7 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb,
|
||||||
parser->state.UNIX.main = PL_UNIX_FILETYPE;
|
parser->state.UNIX.main = PL_UNIX_FILETYPE;
|
||||||
/* start FSM again not considering size of directory */
|
/* start FSM again not considering size of directory */
|
||||||
finfo->b_used = 0;
|
finfo->b_used = 0;
|
||||||
i--;
|
continue;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PL_UNIX_TOTALSIZE_READING:
|
case PL_UNIX_TOTALSIZE_READING:
|
||||||
|
|
Loading…
Reference in New Issue