From: Martin Matuska Date: Wed, 25 Jan 2017 00:29:16 +0000 (+0100) Subject: WARC reader: do not consider CR or LF as space in xstrpisotime() X-Git-Tag: v3.3.0~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23ccc71cc9869c0d6ddf04075432fe693abe2c73;p=thirdparty%2Flibarchive.git WARC reader: do not consider CR or LF as space in xstrpisotime() Fixes possible heap-buffer-overflow. Reported-By: OSS-Fuzz issue 382, 458 --- 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 */