From 23ccc71cc9869c0d6ddf04075432fe693abe2c73 Mon Sep 17 00:00:00 2001 From: Martin Matuska Date: Wed, 25 Jan 2017 01:29:16 +0100 Subject: [PATCH] WARC reader: do not consider CR or LF as space in xstrpisotime() Fixes possible heap-buffer-overflow. Reported-By: OSS-Fuzz issue 382, 458 --- libarchive/archive_read_support_format_warc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libarchive/archive_read_support_format_warc.c b/libarchive/archive_read_support_format_warc.c index 8eda519eb..30cdaf9db 100644 --- a/libarchive/archive_read_support_format_warc.c +++ b/libarchive/archive_read_support_format_warc.c @@ -534,7 +534,7 @@ xstrpisotime(const char *s, char **endptr) /* as a courtesy to our callers, and since this is a non-standard * routine, we skip leading whitespace */ - while (isspace((unsigned char)*s)) + while (isblank((unsigned char)*s)) ++s; /* read year */ -- 2.47.3