Unverified Commit c05d77ee authored by Tim Rühsen's avatar Tim Rühsen Committed by Daniel Stenberg
Browse files

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
parent fcf3f133
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -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: