aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Rühsen <tim.ruehsen@gmx.de>2018-11-03 18:49:00 +0100
committerDaniel Stenberg <daniel@haxx.se>2018-11-09 23:08:46 +0100
commitc05d77ee7dd23ebec68c3ef4012fb8febd78f8af (patch)
tree78f1f6e31ea4e2ea78952b6cbee4d5cde59c1415
parentfcf3f133682d5d5c853290841accd5170d2ccc70 (diff)
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
-rw-r--r--lib/ftplistparser.c2
1 files changed, 1 insertions, 1 deletions
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: