1
0
mirror of https://github.com/mirror/wget.git synced 2025-03-28 13:00:10 +08:00

* src/ftp-ls.c (ftp_parse_winnt_ls): Fix heap-buffer-overflow

Fixes OSS-Fuzz issue .
This is a long standing bug affecting all versions <= 1.19.4.
This commit is contained in:
Tim Rühsen 2018-04-22 11:33:13 +02:00
parent 2269cc2f1b
commit 96c64a859d

View File

@ -478,7 +478,7 @@ ftp_parse_winnt_ls (FILE *fp)
min = atoi(tok);
/* Adjust hour from AM/PM. Just for the record, the sequence goes
11:00AM, 12:00PM, 01:00PM ... 11:00PM, 12:00AM, 01:00AM . */
tok+=2;
if (tok[0] && tok[1]) tok+=2;
if (hour == 12) hour = 0;
if (*tok == 'P') hour += 12;