]> git.ipfire.org Git - thirdparty/libarchive.git/log
thirdparty/libarchive.git
9 years agoFixed build error in test_read_format_zip_high_compression.c 751/head
aahancoc [Tue, 26 Jul 2016 20:03:54 +0000 (16:03 -0400)] 
Fixed build error in test_read_format_zip_high_compression.c

C89 (what this library is compiled in) requires for loop iterators to be initialized outside the for loop.

9 years agoIssue 748: Regression test
Tim Kientzle [Sun, 24 Jul 2016 05:11:46 +0000 (22:11 -0700)] 
Issue 748: Regression test

9 years agoMerge pull request #750 from cpatulea/master
Tim Kientzle [Sun, 24 Jul 2016 00:49:22 +0000 (17:49 -0700)] 
Merge pull request #750 from cpatulea/master

ustar: fix out of bounds read on empty string ("") filename.

9 years agoustar: fix out of bounds read on empty string ("") filename. 750/head
Catalin Patulea [Fri, 22 Jul 2016 15:27:31 +0000 (11:27 -0400)] 
ustar: fix out of bounds read on empty string ("") filename.

9 years agoIssue 720: Allow dashes in third-party version numbers
Tim Kientzle [Thu, 21 Jul 2016 03:27:45 +0000 (20:27 -0700)] 
Issue 720: Allow dashes in third-party version numbers

9 years agoIssue 695: Check return value of fwrite/fclose
Tim Kientzle [Thu, 21 Jul 2016 03:22:25 +0000 (20:22 -0700)] 
Issue 695:  Check return value of fwrite/fclose

9 years agoMerge pull request #739 from ppentchev/roam-cppcheck
Tim Kientzle [Sun, 17 Jul 2016 20:05:01 +0000 (13:05 -0700)] 
Merge pull request #739 from ppentchev/roam-cppcheck

Fix two minor complaints by cppcheck.

9 years agoMerge branch 'master' of github.com:libarchive/libarchive
Tim Kientzle [Sun, 17 Jul 2016 15:29:23 +0000 (08:29 -0700)] 
Merge branch 'master' of github.com:libarchive/libarchive

9 years agoFix check for GCC >= 4.8
Tim Kientzle [Sun, 17 Jul 2016 15:28:51 +0000 (08:28 -0700)] 
Fix check for GCC >= 4.8

9 years agoMerge pull request #737 from ppentchev/roam-typo-candidate
Tim Kientzle [Sun, 17 Jul 2016 14:36:34 +0000 (07:36 -0700)] 
Merge pull request #737 from ppentchev/roam-typo-candidate

Fix a typographical error in a struct member: candiate -> candidate

9 years agoMerge pull request #736 from ppentchev/roam-typos
Tim Kientzle [Sun, 17 Jul 2016 14:35:45 +0000 (07:35 -0700)] 
Merge pull request #736 from ppentchev/roam-typos

Fix a couple of typographical errors.

9 years agoFix two minor complaints by cppcheck. 739/head
Peter Pentchev [Thu, 7 Jul 2016 15:22:04 +0000 (18:22 +0300)] 
Fix two minor complaints by cppcheck.

9 years agoFix a typo in a struct member: candiate -> candidate. 737/head
Peter Pentchev [Thu, 7 Jul 2016 08:12:08 +0000 (11:12 +0300)] 
Fix a typo in a struct member: candiate -> candidate.

9 years agoFix a couple of typographical errors. 736/head
Peter Pentchev [Thu, 7 Jul 2016 08:05:31 +0000 (11:05 +0300)] 
Fix a couple of typographical errors.

9 years agoMerge LZMA MP detection from configure.
Joerg Sonnenberger [Sat, 2 Jul 2016 08:44:03 +0000 (10:44 +0200)] 
Merge LZMA MP detection from configure.

9 years agoMerge struct vfsconf detection from configure for DragonFly.
Joerg Sonnenberger [Sat, 2 Jul 2016 08:34:06 +0000 (10:34 +0200)] 
Merge struct vfsconf detection from configure for DragonFly.

9 years agoMerge pull request #733 from tpgxyz/master
Tim Kientzle [Fri, 1 Jul 2016 02:17:03 +0000 (19:17 -0700)] 
Merge pull request #733 from tpgxyz/master

Support GNU tar --blocking-factor and GNU cpio --dereference

9 years agosort it 733/head
tpg [Thu, 30 Jun 2016 19:12:13 +0000 (21:12 +0200)] 
sort it

9 years agoadd GNU compatible blocking-factor alias, add cpio long alias for dereference
tpg [Wed, 29 Jun 2016 19:04:08 +0000 (21:04 +0200)] 
add GNU compatible blocking-factor alias, add cpio long alias for dereference

9 years agoMerge pull request #727 from jcfr/use-cmake-builtin-module-CheckStructHasMember
Tim Kientzle [Tue, 28 Jun 2016 05:11:35 +0000 (22:11 -0700)] 
Merge pull request #727 from jcfr/use-cmake-builtin-module-CheckStructHasMember

Use CMake module "CheckStructHasMember" and remove custom "CheckStructMember"

9 years agoFreeBSD bug 204157: If filesystem does not support birthtime, then make all birthtim...
Tim Kientzle [Fri, 24 Jun 2016 05:16:03 +0000 (22:16 -0700)] 
FreeBSD bug 204157:  If filesystem does not support birthtime, then make all birthtime comparisons succeed.

This is a bit of a hack:  We should also have tests that verify
different birthtimes.  When/if that happens, we'll need to add
a real system probe to determine whether birthtime is actually
supported on this particular filesystem and skip tests accordingly.

9 years agoIssue 686: Keep retrying until buffer is big enough
Tim Kientzle [Fri, 24 Jun 2016 05:07:19 +0000 (22:07 -0700)] 
Issue 686: Keep retrying until buffer is big enough

@duy-github pointed out that commit 9134c3a fixed
one place where this mistake occurred, but left three
other places.

9 years agoFor getvfsbyname on DragonFly, struct vfsconf has to be used and not
Joerg Sonnenberger [Thu, 23 Jun 2016 13:16:16 +0000 (15:16 +0200)] 
For getvfsbyname on DragonFly, struct vfsconf has to be used and not
struct xvfsconf as on FreeBSD.

9 years agoAvoid use of C99 for-scope declarations to fix issue #729.
Joerg Sonnenberger [Wed, 22 Jun 2016 21:09:27 +0000 (23:09 +0200)] 
Avoid use of C99 for-scope declarations to fix issue #729.

9 years agoIgnore the MT encoder in XZ 5.2 prerelease versions.
Joerg Sonnenberger [Wed, 22 Jun 2016 21:03:43 +0000 (23:03 +0200)] 
Ignore the MT encoder in XZ 5.2 prerelease versions.

9 years agoOlder Solaris at least has no _PATH_TTY, so provide a fallback.
Joerg Sonnenberger [Wed, 22 Jun 2016 13:00:34 +0000 (15:00 +0200)] 
Older Solaris at least has no _PATH_TTY, so provide a fallback.

9 years agoUse CMake module "CheckStructHasMember" and remove custom "CheckStructMember" 727/head
Jean-Christophe Fillion-Robin [Wed, 22 Jun 2016 06:40:54 +0000 (02:40 -0400)] 
Use CMake module "CheckStructHasMember" and remove custom "CheckStructMember"

9 years agoDummy out copy_acls if sys/acl.h is missing or ACL support is disabled.
Joerg Sonnenberger [Tue, 21 Jun 2016 16:29:07 +0000 (18:29 +0200)] 
Dummy out copy_acls if sys/acl.h is missing or ACL support is disabled.

9 years agoMerge pull request #726 from mmatuska/cpio_version
Tim Kientzle [Tue, 21 Jun 2016 15:01:34 +0000 (08:01 -0700)] 
Merge pull request #726 from mmatuska/cpio_version

Fix test for cpio version dash fix

9 years agoSIGRTMAX doesn't exist on all systems, so compute the largest used
Joerg Sonnenberger [Tue, 21 Jun 2016 13:21:20 +0000 (15:21 +0200)] 
SIGRTMAX doesn't exist on all systems, so compute the largest used
signal number. Don't bother with dynamically allocating the array, just
use a static array instead. Fix ctype use.

9 years agoIn the past, OpenSSL was not needed by the main libarchive when the hash
Joerg Sonnenberger [Tue, 21 Jun 2016 13:12:20 +0000 (15:12 +0200)] 
In the past, OpenSSL was not needed by the main libarchive when the hash
functions were provided by libc, e.g. on NetBSD. With the introduction
of the de-/encryption support, this is no longer the case. As such,
explicitly check for the necessary EVP routines as well to make sure
that -lcrypto is added as necessary.

9 years agoMany systems have bswap16 in system headers, so undef it first to avoid
Joerg Sonnenberger [Tue, 21 Jun 2016 13:03:08 +0000 (15:03 +0200)] 
Many systems have bswap16 in system headers, so undef it first to avoid
compiler warnings.

9 years agoFix ctype use. Avoid empty loop bodies.
Joerg Sonnenberger [Tue, 21 Jun 2016 12:45:37 +0000 (14:45 +0200)] 
Fix ctype use. Avoid empty loop bodies.

9 years agoFix argument range of ctype functions.
Joerg Sonnenberger [Tue, 21 Jun 2016 12:34:02 +0000 (14:34 +0200)] 
Fix argument range of ctype functions.

9 years agoSupport maintainer mode
Joerg Sonnenberger [Tue, 21 Jun 2016 12:23:36 +0000 (14:23 +0200)] 
Support maintainer mode

The time stamp checks for configure and Makefile.in are sometimes problematic, so allow disabling them.

9 years agoFix test for cpio version dash fix 726/head
Martin Matuska [Tue, 21 Jun 2016 06:30:54 +0000 (08:30 +0200)] 
Fix test for cpio version dash fix

9 years agoMerge pull request #725 from mmatuska/cpio_version
Tim Kientzle [Tue, 21 Jun 2016 02:54:56 +0000 (19:54 -0700)] 
Merge pull request #725 from mmatuska/cpio_version

Report cpio version string with one dash only

9 years agoReport cpio version string with one dash only 725/head
Martin Matuska [Mon, 20 Jun 2016 23:55:50 +0000 (01:55 +0200)] 
Report cpio version string with one dash only

9 years agoLibarchive 3.2.1 v3.2.1
Tim Kientzle [Mon, 20 Jun 2016 03:30:48 +0000 (20:30 -0700)] 
Libarchive 3.2.1

9 years agoAdd missing reference file to distribution
Tim Kientzle [Mon, 20 Jun 2016 02:56:02 +0000 (19:56 -0700)] 
Add missing reference file to distribution

9 years agoFix array overflow in test suite
Tim Kientzle [Sun, 19 Jun 2016 23:11:24 +0000 (16:11 -0700)] 
Fix array overflow in test suite

9 years agoFix filename spelling
Tim Kientzle [Sun, 19 Jun 2016 23:11:09 +0000 (16:11 -0700)] 
Fix filename spelling

9 years agoIssue 719: Refuse to allocate a too-small PPMD7 context
Tim Kientzle [Sun, 19 Jun 2016 22:58:33 +0000 (15:58 -0700)] 
Issue 719:  Refuse to allocate a too-small PPMD7 context

Other parts of the PPMD7 code assume that the dictionary is
at least UNIT_SIZE (12 bytes).  Enforce that assumption here
to avoid potential buffer under- and over-runs.

This was pointed out in a review of the original fix for Issue 719.

9 years agoIssue 521: Properly check reading from lzss decompression buffer
Tim Kientzle [Sun, 19 Jun 2016 22:31:46 +0000 (15:31 -0700)] 
Issue 521:  Properly check reading from lzss decompression buffer

Prior code could be tricked into trying to copy data
from beyond the end of the internal decompression buffer.

Thanks to Hanno Böck for his ongoing fuzz-testing work with libarchive.

9 years agoIssue 717: Fix integer overflow when computing location of volume descriptor
Tim Kientzle [Sun, 19 Jun 2016 21:34:37 +0000 (14:34 -0700)] 
Issue 717:  Fix integer overflow when computing location of volume descriptor

The multiplication here defaulted to 'int' but calculations
of file positions should always use int64_t.  A simple cast
suffices to fix this since the base location is always 32 bits
for ISO, so multiplying by the sector size will never overflow
a 64-bit integer.

9 years agoIssue 719: Fix for TALOS-CAN-154
Tim Kientzle [Sun, 19 Jun 2016 21:21:42 +0000 (14:21 -0700)] 
Issue 719:  Fix for TALOS-CAN-154

A RAR file with an invalid zero dictionary size was not being
rejected, leading to a zero-sized allocation for the dictionary
storage which was then overwritten during the dictionary initialization.

Thanks to the Open Source and Threat Intelligence project at Cisco for
reporting this.

9 years agoIssue #718: Fix TALOS-CAN-152
Tim Kientzle [Sun, 19 Jun 2016 21:14:09 +0000 (14:14 -0700)] 
Issue #718: Fix TALOS-CAN-152

If a 7-Zip archive declares a rediculously large number of substreams,
it can overflow an internal counter, leading a subsequent memory
allocation to be too small for the substream data.

Thanks to the Open Source and Threat Intelligence project at Cisco
for reporting this issue.

9 years agoIssue 553: Fix broken decryption for ZIP files.
Tim Kientzle [Thu, 16 Jun 2016 01:38:30 +0000 (18:38 -0700)] 
Issue 553: Fix broken decryption for ZIP files.

Sometimes, decompressing was failing due to miscalculation of buffer
offsets, and hence causing a silent buffer overflow.

When a previous chunk decompression left some bytes in the decryption
buffer, it was not taken into account in determining space left in the
decompression buffer.

So, it could happen, that the decryption buffer is completely full,
but some bytes are not used yet. In such case, even though the buffer
is full, the code tried to decrypt more bytes behind it's boundary.

This CL resolves this issue by properly calculating the amount of
space left in the decompression buffer.

(This is an edited version of Tomasz Mikolajewski's pull request.)

9 years agoMerge pull request #716 from Tarsnap/remove-dead-code
Tim Kientzle [Tue, 14 Jun 2016 14:03:59 +0000 (07:03 -0700)] 
Merge pull request #716 from Tarsnap/remove-dead-code

Remove dead code in archive_entry_xattr_add_entry()

9 years agoRemove dead code in archive_entry_xattr_add_entry() 716/head
Graham Percival [Mon, 13 Jun 2016 23:13:06 +0000 (16:13 -0700)] 
Remove dead code in archive_entry_xattr_add_entry()

The code seems to be walking through the linked list beginning at
entry->xattr_head, but then it immediately sets xp to be something different.

This is 10-year old code; it was added in the first "POSIX.1e-style Extended
Attribute support" commit, on March 21 2006:
https://svnweb.freebsd.org/base/head/lib/libarchive/archive_entry.c?annotate=156961&pathrev=156961#l1387

9 years agoMerge pull request #715 from mfont-ws/fix_archive_read_support_format_mtree.c_1388_11
Tim Kientzle [Sat, 11 Jun 2016 05:00:18 +0000 (22:00 -0700)] 
Merge pull request #715 from mfont-ws/fix_archive_read_support_format_mtree.c_1388_11

Fix libarchive/archive_read_support_format_mtree.c:1388:11: error: ar…

9 years agoFix libarchive/archive_read_support_format_mtree.c:1388:11: error: array subscript... 715/head
mfont [Fri, 10 Jun 2016 14:54:43 +0000 (16:54 +0200)] 
Fix libarchive/archive_read_support_format_mtree.c:1388:11: error: array subscript is above array bounds

9 years agoMerge pull request #714 from finetjul/support-extended-path-in-permissive_name_w
Tim Kientzle [Thu, 9 Jun 2016 01:59:20 +0000 (18:59 -0700)] 
Merge pull request #714 from finetjul/support-extended-path-in-permissive_name_w

Do not preppend \\?\ if it is already there

9 years agoDo not preppend \\?\ if it is already there 714/head
Julien Finet [Wed, 8 Jun 2016 14:39:52 +0000 (16:39 +0200)] 
Do not preppend \\?\ if it is already there

If GetCurrentDirectory() returns \\?\C\a\path or
\\?\UNC\server\a\path, then adding \\?\ would not work.

9 years agoMerge pull request #713 from abhinav-upadhyay/fix-man-page
Joerg Sonnenberger [Mon, 6 Jun 2016 15:00:44 +0000 (17:00 +0200)] 
Merge pull request #713 from abhinav-upadhyay/fix-man-page

Remove .Pp before .Bl

9 years agoRemove .Pp before .Bl 713/head
Abhinav Upadhyay [Mon, 6 Jun 2016 14:46:09 +0000 (20:16 +0530)] 
Remove .Pp before .Bl

9 years agoMerge pull request #603 from Tarsnap/add-entry-allocation-failure-error-xattr
Tim Kientzle [Fri, 3 Jun 2016 13:47:45 +0000 (06:47 -0700)] 
Merge pull request #603 from Tarsnap/add-entry-allocation-failure-error-xattr

Add entry allocation failure error xattr

9 years agoFix the broken test name
Tim Kientzle [Fri, 3 Jun 2016 13:46:40 +0000 (06:46 -0700)] 
Fix the broken test name

9 years agoMerge pull request #712 from maxinbjohn/master
Tim Kientzle [Fri, 3 Jun 2016 13:44:06 +0000 (06:44 -0700)] 
Merge pull request #712 from maxinbjohn/master

configure.ac: check acl/libacl.h and sys/acl.h based on requirement

9 years agoMakefile.am: Remove non-existing file 712/head
Maxin B. John [Fri, 3 Jun 2016 11:09:30 +0000 (14:09 +0300)] 
Makefile.am: Remove non-existing file

Fixes this build error:

CC       libarchive/archive_write_set_format_gnutar.lo
make[1]: *** No rule to make target
'libarchive/archive_write_set_format_gnutar_filenames.c', needed by
'libarchive/archive_write_set_format_gnutar_filenames.lo'.  Stop.
make[1]: Leaving directory '/home/maxin/clone/libarchive'
Makefile:2866: recipe for target 'all' failed
make: *** [all] Error 2

Signed-off-by: Maxin B. John <maxin.john@intel.com>
9 years agoconfigure.ac: check acl/libacl.h and sys/acl.h based on requirement
Maxin B. John [Thu, 2 Jun 2016 13:08:02 +0000 (16:08 +0300)] 
configure.ac: check acl/libacl.h and sys/acl.h based on requirement

acl/libacl.h and sys/acl.h check should not happen when we explicitly
disable it with --disable-acl.

Similarly, update attr/xattr.h for --disable-xattr option.

Update the help texts to reflect what it really does.

Signed-off-by: Maxin B. John <maxin.john@intel.com>
9 years agoIssue 657: Allow up to 8k for the test root directory name
Tim Kientzle [Fri, 3 Jun 2016 03:17:13 +0000 (20:17 -0700)] 
Issue 657: Allow up to 8k for the test root directory name

9 years agoIssue 682: Correctly write gnutar filenames of exactly 512 bytes
Tim Kientzle [Wed, 1 Jun 2016 04:01:59 +0000 (21:01 -0700)] 
Issue 682: Correctly write gnutar filenames of exactly 512 bytes

Previous code omitted the final zero byte for filenames and
linknames.  This is usually okay since the final block is
padded with zero bytes, but if the filename exactly filled
the block, there would be no zero byte.

9 years agoIssue 708: tar should fail if a named input file is missing
Tim Kientzle [Sat, 28 May 2016 19:39:10 +0000 (12:39 -0700)] 
Issue 708: tar should fail if a named input file is missing

Tar was exiting with success if an input file named on the command
line was not present.

Includes tests for both bsdtar and bsdcpio to ensure this does
not regress.

9 years agoIssue 711: Be more careful about verifying filename lengths when writing ISO9660...
Tim Kientzle [Sat, 28 May 2016 18:50:39 +0000 (11:50 -0700)] 
Issue 711:  Be more careful about verifying filename lengths when writing ISO9660 archives

* Don't cast size_t to int, since this can lead to overflow
  on machines where sizeof(int) < sizeof(size_t)
* Check a + b > limit by writing it as
    a > limit || b > limit || a + b > limit
  to avoid problems when a + b wraps around.

9 years agoTypo
Joerg Sonnenberger [Fri, 27 May 2016 14:31:34 +0000 (16:31 +0200)] 
Typo

9 years agoAdd short description of the manpage.
Joerg Sonnenberger [Fri, 27 May 2016 14:30:45 +0000 (16:30 +0200)] 
Add short description of the manpage.

9 years agoFix man page syntax to include a description.
Joerg Sonnenberger [Fri, 27 May 2016 14:28:39 +0000 (16:28 +0200)] 
Fix man page syntax to include a description.

9 years agoMerge pull request #709 from mmatuska/bsdcpio_passthrough
Tim Kientzle [Mon, 16 May 2016 00:40:15 +0000 (17:40 -0700)] 
Merge pull request #709 from mmatuska/bsdcpio_passthrough

Disable ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS in bsdcpio p mode

9 years agoDisable ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS in bsdcpio p mode 709/head
Martin Matuska [Sun, 15 May 2016 08:38:46 +0000 (10:38 +0200)] 
Disable ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS in bsdcpio p mode

9 years agoReject cpio symlinks that exceed 1MB
Tim Kientzle [Sat, 14 May 2016 19:37:37 +0000 (12:37 -0700)] 
Reject cpio symlinks that exceed 1MB

9 years agoMerge pull request #702 from mmatuska/bsdcat_warnings
Tim Kientzle [Thu, 12 May 2016 15:33:27 +0000 (08:33 -0700)] 
Merge pull request #702 from mmatuska/bsdcat_warnings

cat: declare static variables and fix compiler warnings

9 years agoMerge pull request #703 from mmatuska/libarchive_fe_static
Tim Kientzle [Thu, 12 May 2016 15:32:55 +0000 (08:32 -0700)] 
Merge pull request #703 from mmatuska/libarchive_fe_static

libarchive_fe: declare lafe_progname static

9 years agoMerge pull request #701 from mmatuska/const_char_fix
Tim Kientzle [Thu, 12 May 2016 15:32:27 +0000 (08:32 -0700)] 
Merge pull request #701 from mmatuska/const_char_fix

Fix const char warnings

9 years agocat: declare static variables and fix several compiler warnings 702/head
Martin Matuska [Wed, 11 May 2016 09:26:47 +0000 (11:26 +0200)] 
cat: declare static variables and fix several compiler warnings

9 years agoFix const char warning 701/head
Martin Matuska [Wed, 11 May 2016 07:01:43 +0000 (09:01 +0200)] 
Fix const char warning

9 years agoMake some arguments const
Tim Kientzle [Wed, 11 May 2016 01:54:02 +0000 (18:54 -0700)] 
Make some arguments const

9 years agoDeclare lafe_progname static 703/head
Martin Matuska [Wed, 11 May 2016 00:09:53 +0000 (02:09 +0200)] 
Declare lafe_progname static

9 years agoMerge pull request #700 from xtraeme/lzma-xz-mt
Tim Kientzle [Fri, 6 May 2016 02:34:21 +0000 (19:34 -0700)] 
Merge pull request #700 from xtraeme/lzma-xz-mt

configure.ac: declare HAVE_LZMA_STREAM_ENCODER_MT properly

9 years agoconfigure.ac: define HAVE_LZMA_STREAM_ENCODER_MT if it is detected properly. 700/head
Juan RP [Thu, 5 May 2016 05:55:57 +0000 (07:55 +0200)] 
configure.ac: define HAVE_LZMA_STREAM_ENCODER_MT if it is detected properly.

... otherwise HAVE_LZMA_STREAM_ENCODER_MT is undefined and the code
for multithreaded xz compression is skipped completely.

9 years agoMerge pull request #698 from bradking/fix-spelling-typos
Joerg Sonnenberger [Mon, 2 May 2016 16:07:05 +0000 (18:07 +0200)] 
Merge pull request #698 from bradking/fix-spelling-typos

Fix spelling typos in comments

9 years agoFix spelling typos in comments 698/head
Brad King [Mon, 2 May 2016 14:56:28 +0000 (10:56 -0400)] 
Fix spelling typos in comments

The Debian package checker tool (lintian) detected a few typos.

Reported-by: Felix Geyer <fgeyer@debian.org>
9 years agoLibarchive 3.2.0 v3.2.0
Tim Kientzle [Sat, 30 Apr 2016 17:26:35 +0000 (10:26 -0700)] 
Libarchive 3.2.0

9 years agoSync up test harnesses
Tim Kientzle [Sat, 30 Apr 2016 04:49:34 +0000 (21:49 -0700)] 
Sync up test harnesses

9 years agoMerge branch 'vu862384'
Tim Kientzle [Sat, 30 Apr 2016 04:41:49 +0000 (21:41 -0700)] 
Merge branch 'vu862384'

Fixes Issue 656
Fixes CVE-2016-1541
Fixes VU#862384
Fixes TALOS-CAN-155

9 years agoIssue 585: archive.h needs time.h
Tim Kientzle [Fri, 29 Apr 2016 02:54:47 +0000 (19:54 -0700)] 
Issue 585: archive.h needs time.h

9 years agoIssue 695: check fwrite return value, sync up test harnesses
Tim Kientzle [Fri, 29 Apr 2016 02:44:20 +0000 (19:44 -0700)] 
Issue 695: check fwrite return value, sync up test harnesses

9 years agoIssue 693: assert() wants a boolean, not a pointer
Tim Kientzle [Thu, 28 Apr 2016 06:27:43 +0000 (23:27 -0700)] 
Issue 693: assert() wants a boolean, not a pointer

9 years agoIssue 690: Document the possible need for -lacl on some Linux systems
Tim Kientzle [Thu, 28 Apr 2016 06:20:40 +0000 (23:20 -0700)] 
Issue 690: Document the possible need for -lacl on some Linux systems

9 years agoIssue 692: More robust check for lzma_stream_encoder_mt
Tim Kientzle [Thu, 28 Apr 2016 06:15:08 +0000 (23:15 -0700)] 
Issue 692: More robust check for lzma_stream_encoder_mt

9 years agoIssue 692: Fix typo in newc cpio test
Tim Kientzle [Thu, 28 Apr 2016 06:10:02 +0000 (23:10 -0700)] 
Issue 692: Fix typo in newc cpio test

9 years agoIssue 685: Just verify the body of the error message; ignore the program name
Tim Kientzle [Thu, 28 Apr 2016 06:05:19 +0000 (23:05 -0700)] 
Issue 685: Just verify the body of the error message; ignore the program name

9 years agoMerge branch 'master' of github.com:libarchive/libarchive
Tim Kientzle [Thu, 28 Apr 2016 05:48:41 +0000 (22:48 -0700)] 
Merge branch 'master' of github.com:libarchive/libarchive

9 years agoIssue 686: Correctly retry if the buffer needs to be grown
Tim Kientzle [Thu, 28 Apr 2016 05:48:20 +0000 (22:48 -0700)] 
Issue 686: Correctly retry if the buffer needs to be grown

9 years agoDefault to Windows 7 SDK
Tim Kientzle [Mon, 25 Apr 2016 03:41:12 +0000 (20:41 -0700)] 
Default to Windows 7 SDK

Some of our current crypto bindings require the Win7 SDK.
Once we can rework those, this could reasonably be changed
to Win Vista or possibly Win Server 2003.

I'd like to completely remove support for WinXP and earlier.

9 years agoDefine NTDDI_VERSION on Windows, default to Windows Server 2003 instead of WinXP
Tim Kientzle [Mon, 25 Apr 2016 03:39:15 +0000 (20:39 -0700)] 
Define NTDDI_VERSION on Windows, default to Windows Server 2003 instead of WinXP

9 years agoAccomodate different return codes on Windows
Tim Kientzle [Mon, 25 Apr 2016 03:35:45 +0000 (20:35 -0700)] 
Accomodate different return codes on Windows

9 years agoArithmetic with void * pointers is a bad idea
Tim Kientzle [Mon, 25 Apr 2016 01:45:58 +0000 (18:45 -0700)] 
Arithmetic with void * pointers is a bad idea

9 years agoIssue #656: Fix CVE-2016-1541, VU#862384
Tim Kientzle [Mon, 25 Apr 2016 00:13:45 +0000 (17:13 -0700)] 
Issue #656:  Fix CVE-2016-1541, VU#862384

When reading OS X metadata entries in Zip archives that were stored
without compression, libarchive would use the uncompressed entry size
to allocate a buffer but would use the compressed entry size to limit
the amount of data copied into that buffer.  Since the compressed
and uncompressed sizes are provided by data in the archive itself,
an attacker could manipulate these values to write data beyond
the end of the allocated buffer.

This fix provides three new checks to guard against such
manipulation and to make libarchive generally more robust when
handling this type of entry:
 1. If an OS X metadata entry is stored without compression,
    abort the entire archive if the compressed and uncompressed
    data sizes do not match.
 2. When sanity-checking the size of an OS X metadata entry,
    abort this entry if either the compressed or uncompressed
    size is larger than 4MB.
 3. When copying data into the allocated buffer, check the copy
    size against both the compressed entry size and uncompressed
    entry size.

9 years agoEnsure that cryptor, hmac, and xxhash always define at least one symbol. This preven...
Tim Kientzle [Sun, 24 Apr 2016 22:16:10 +0000 (15:16 -0700)] 
Ensure that cryptor, hmac, and xxhash always define at least one symbol.  This prevents headaches with compilers and linkers that choke on empty object files.