]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Add a check to archive_read_filter_consume to reject any
authorTim Kientzle <kientzle@acm.org>
Sat, 31 Jan 2015 07:57:03 +0000 (23:57 -0800)
committerTim Kientzle <kientzle@acm.org>
Sun, 1 Feb 2015 22:14:03 +0000 (14:14 -0800)
attempts to move the file pointer by a negative amount.

Note:  Either this or commit 3865cf2 provides a fix for
Issue 394.

libarchive/archive_read.c

index 8f71a8b939bc12a7c990db12c907bad3c9ed87a6..d649e9aae1de3b6073f321a5d961991ffbd81294 100644 (file)
@@ -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;