From: Tim Kientzle Date: Sat, 31 Jan 2015 07:57:03 +0000 (-0800) Subject: Add a check to archive_read_filter_consume to reject any X-Git-Tag: v3.1.900a~146 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6c9668f3202215ddb71617b41c19b6f05acf008;p=thirdparty%2Flibarchive.git Add a check to archive_read_filter_consume to reject any attempts to move the file pointer by a negative amount. Note: Either this or commit 3865cf2 provides a fix for Issue 394. --- diff --git a/libarchive/archive_read.c b/libarchive/archive_read.c index 8f71a8b93..d649e9aae 100644 --- a/libarchive/archive_read.c +++ b/libarchive/archive_read.c @@ -1471,6 +1471,8 @@ __archive_read_filter_consume(struct archive_read_filter * filter, { int64_t skipped; + if (request < 0) + return ARCHIVE_FATAL; if (request == 0) return 0;