diff --git a/libarchive/archive_read.c b/libarchive/archive_read.c index 048c316c52d4..7f3edc1567dd 100644 --- a/libarchive/archive_read.c +++ b/libarchive/archive_read.c @@ -1394,6 +1394,8 @@ __archive_read_filter_consume(struct archive_read_filter * filter, { int64_t skipped; + if (request < 0) + return ARCHIVE_FATAL; if (request == 0) return 0;