]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
WARC reader: do not consider CR or LF as space in xstrpisotime()
authorMartin Matuska <martin@matuska.org>
Wed, 25 Jan 2017 00:29:16 +0000 (01:29 +0100)
committerMartin Matuska <martin@matuska.org>
Wed, 25 Jan 2017 00:48:44 +0000 (01:48 +0100)
Fixes possible heap-buffer-overflow.

Reported-By: OSS-Fuzz issue 382, 458

libarchive/archive_read_support_format_warc.c

index 8eda519eb1499b0ab40afc5fc0205102075446bf..30cdaf9dbb749c4b6dcfc162430a0b8591d1c7dc 100644 (file)
@@ -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 */