]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r196962: Fix /usr/bin/unzip: A bug deep in libarchive's read-ahead logic
authorkientzle <kientzle@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 17 Sep 2009 06:31:59 +0000 (06:31 +0000)
committerkientzle <kientzle@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 17 Sep 2009 06:31:59 +0000 (06:31 +0000)
commitdb90503ddcf83fe23a9dac22ab328e6d35f17cab
tree9e0e5270b61286ca5802c9d2e92c1ae1d69121b9
parenta12ddf7d6b6140d71093735378c450d092d18df0
MFC r196962: Fix /usr/bin/unzip: A bug deep in libarchive's read-ahead logic
(incorrect handling of zero-length reads before the copy buffer is
allocated) is masked by the iso9660 taster.  Tar and cpio both enable
that taster so were protected from the bug; unzip is susceptible.

This both fixes the bug and updates the test harness to exercise
this case.

Submitted by: Ed Schouten diagnosed the bug and drafted a patch
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197266 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
lib/libarchive/archive_read.c
lib/libarchive/test/test_compat_zip.c