From: Tim Rühsen Date: Sat, 3 Nov 2018 17:49:00 +0000 (+0100) Subject: ftp: avoid two unsigned int overflows in FTP listing parser X-Git-Tag: curl-7_63_0~79 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c05d77ee7dd23ebec68c3ef4012fb8febd78f8af;p=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 --- diff --git a/lib/ftplistparser.c b/lib/ftplistparser.c index 249fe09c8..1b1de5c3c 100644 --- a/lib/ftplistparser.c +++ b/lib/ftplistparser.c @@ -405,7 +405,7 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, parser->state.UNIX.main = PL_UNIX_FILETYPE; /* start FSM again not considering size of directory */ finfo->b_used = 0; - i--; + continue; } break; case PL_UNIX_TOTALSIZE_READING: