From b0f802c46c286f4e07c499042ba3e3ea15c2d585 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Sun, 22 Apr 2018 12:45:43 +0200 Subject: [PATCH] * src/ftp-ls.c (ftp_parse_winnt_ls): Fix heap-buffer-overflow Fixes OSS-Fuzz issue #7931. This is a long standing bug affecting all versions <= 1.19.4. --- src/ftp-ls.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ftp-ls.c b/src/ftp-ls.c index 16d642db..80533363 100644 --- a/src/ftp-ls.c +++ b/src/ftp-ls.c @@ -458,6 +458,7 @@ ftp_parse_winnt_ls (FILE *fp) else if (year >= 1900) { year -= 1900; + if (len < 42) continue; filename += 2; } /* Now it is possible to determine the position of the first symbol in