mirror of
https://github.com/mirror/wget.git
synced 2024-12-29 14:30:48 +08:00
* src/ftp-ls.c (ftp_parse_winnt_ls): Fix integer overflow
This commit is contained in:
parent
79c1f333dc
commit
7ee3ad1c48
@ -443,8 +443,8 @@ ftp_parse_winnt_ls (FILE *fp)
|
||||
january will be assumed. */
|
||||
tok = strtok(line, "-");
|
||||
if (tok == NULL) continue;
|
||||
month = atoi(tok) - 1;
|
||||
if (month < 0) month = 0;
|
||||
month = atoi(tok);
|
||||
if (month < 0) month = 0; else month--;
|
||||
tok = strtok(NULL, "-");
|
||||
if (tok == NULL) continue;
|
||||
day = atoi(tok);
|
||||
|
Loading…
Reference in New Issue
Block a user