aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2015-05-14 21:34:20 +0000
committerXin LI <delphij@FreeBSD.org>2015-05-14 21:34:20 +0000
commit95b982db7d3f8e91e71382715ed9ae310114e796 (patch)
tree795a3799749d39c94825c55ea064cb1055d165f2
parentc792c52ca146005fcffb6382b170556d99fa00ca (diff)
downloadsrc-95b982db7d3f8e91e71382715ed9ae310114e796.tar.gz
src-95b982db7d3f8e91e71382715ed9ae310114e796.zip
Apply upstream changeset e6c9668:
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.
Notes
Notes: svn path=/vendor/libarchive/dist/; revision=282928
-rw-r--r--libarchive/archive_read.c2
1 files changed, 2 insertions, 0 deletions
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;