]> git.ipfire.org Git - thirdparty/libarchive.git/commit
Issue 547: problems with compress bidder
authorTim Kientzle <kientzle@acm.org>
Sun, 9 Aug 2015 04:47:43 +0000 (21:47 -0700)
committerTim Kientzle <kientzle@acm.org>
Sun, 9 Aug 2015 04:47:43 +0000 (21:47 -0700)
commitf0b1dbbc325a2d922015eee402b72edd422cb9ea
treef83482e7a8d8b6f7eafaf6ac27d2e4fd8b21758a
parent6322b68e8e0cdcb52c2aa441a8ddfad3f9f4b01b
Issue 547:  problems with compress bidder

The code previously was not very careful about verifying the
compression parameters.  This led to cases where it failed to
reject invalid compressed data at the beginning.  The invalid
left shift was one symptom of this.

The code is now more careful:  It verifies that the compression
parameter byte exists and verifies that the maximum code size
is <= 16 bits.

This also includes some new tests to verify that truncated or
otherwise invalid compressed data is rejected.
libarchive/archive_read_support_filter_compress.c
libarchive/test/test_read_filter_compress.c [new file with mode: 0644]