]> git.ipfire.org Git - thirdparty/libarchive.git/log
thirdparty/libarchive.git
8 years agoFree p (the memory allocated via slurpfile) when done with the contents 838/head
Ngie Cooper [Sat, 10 Dec 2016 23:41:58 +0000 (15:41 -0800)] 
Free p (the memory allocated via slurpfile) when done with the contents

Reported by: Coverity
CID: 1331631133163213316331331646

8 years agoIssue #837: Fix iteration over the available error codes
Tim Kientzle [Fri, 9 Dec 2016 05:56:34 +0000 (21:56 -0800)] 
Issue #837: Fix iteration over the available error codes

8 years agoDo not read beyond strtab table size in _ar_read_header()
Martin Matuska [Thu, 8 Dec 2016 01:45:41 +0000 (02:45 +0100)] 
Do not read beyond strtab table size in _ar_read_header()

Reported-by: OSS-Fuzz issue 237

8 years agoClose filters before freeing
Martin Matuska [Wed, 7 Dec 2016 11:14:25 +0000 (12:14 +0100)] 
Close filters before freeing

Plugs memory leak of allocated filter buffers if archive_read_free()
is called and archive state is ARCHIVE_STATE_FATAL.

Reported-by: OSS-Fuzz issue 227, 230, 239
8 years agoCheck for EVP_CIPHER_CTX_new failure (#836)
Brad King [Tue, 6 Dec 2016 16:35:14 +0000 (11:35 -0500)] 
Check for EVP_CIPHER_CTX_new failure (#836)

If this OpenSSL function fails to allocate memory it returns NULL.

8 years agoReplace malloc + memset with calloc.
Joerg Sonnenberger [Tue, 6 Dec 2016 14:58:03 +0000 (15:58 +0100)] 
Replace malloc + memset with calloc.

8 years agoSimplify by using strdup. Check for allocation failure.
Joerg Sonnenberger [Tue, 6 Dec 2016 14:38:09 +0000 (15:38 +0100)] 
Simplify by using strdup. Check for allocation failure.

8 years agoExplicitly free archive to reduce valgrind noise.
Joerg Sonnenberger [Tue, 6 Dec 2016 14:23:26 +0000 (15:23 +0100)] 
Explicitly free archive to reduce valgrind noise.

8 years agoDon't recommend deprecated functions.
Joerg Sonnenberger [Tue, 6 Dec 2016 14:22:29 +0000 (15:22 +0100)] 
Don't recommend deprecated functions.

8 years agoMerge branch 'master' of github.com:libarchive/libarchive
Joerg Sonnenberger [Tue, 6 Dec 2016 14:09:41 +0000 (15:09 +0100)] 
Merge branch 'master' of github.com:libarchive/libarchive

8 years agoMerge branch 'openssl-1.1'
Brad King [Mon, 5 Dec 2016 16:17:46 +0000 (11:17 -0500)] 
Merge branch 'openssl-1.1'

Pull-request: #826

8 years agoAdd more explanation comments to validate_number_field()
Martin Matuska [Mon, 5 Dec 2016 15:24:54 +0000 (16:24 +0100)] 
Add more explanation comments to validate_number_field()

8 years agoRelax sanity checks of number fields in tar header even more.
Martin Matuska [Mon, 5 Dec 2016 00:05:12 +0000 (01:05 +0100)] 
Relax sanity checks of number fields in tar header even more.

This fixes reading tar archives created by plexus-archiver (used e.g. by
maven-assembly-plugin to create source and binary tar distributions)
version 2.6.2 and lower. These archives may have entries with uid and gid
header fields filled with spaces without any octal digits.

Fixes #832

8 years agoFix hang in uudecode_filter_read()
Martin Matuska [Sat, 3 Dec 2016 01:16:18 +0000 (02:16 +0100)] 
Fix hang in uudecode_filter_read()

Reported-by: OSS-Fuzz issue 16
8 years agoSpelling fixes (#831)
Graham Percival [Sat, 3 Dec 2016 23:00:40 +0000 (15:00 -0800)] 
Spelling fixes (#831)

Sponsored by: Tarsnap Backup Inc.

8 years agoReject an 'ar' filename table larger than 1GB or a filename larger than 1MB.
Tim Kientzle [Sat, 3 Dec 2016 07:41:52 +0000 (23:41 -0800)] 
Reject an 'ar' filename table larger than 1GB or a filename larger than 1MB.

Suggested by issue 220 from OSS-Fuzz project.

8 years agoDramatically simplify loop and avoid a read-beyond-buffer issue.
Joerg Sonnenberger [Fri, 2 Dec 2016 11:00:28 +0000 (12:00 +0100)] 
Dramatically simplify loop and avoid a read-beyond-buffer issue.

Triggered by OSS-fuzz reports.

8 years agoFix heap buffer overflow in uudecode_bidder_bid()
Martin Matuska [Fri, 2 Dec 2016 09:08:02 +0000 (10:08 +0100)] 
Fix heap buffer overflow in uudecode_bidder_bid()

Reported-by: OSS-Fuzz issue 139, 145, 152
8 years agoRework the valid_number_field test function to be more
Tim Kientzle [Fri, 2 Dec 2016 04:09:59 +0000 (20:09 -0800)] 
Rework the valid_number_field test function to be more
lenient.  There are an enormous number of tar writing
programs, many which don't quite follow the specs.

Note:  I don't think I recall seeing any that left
number fields with trailing garbage; I may be wrong
about that, in which case, this would have to stop
at the first NUL (after the first octal character).

8 years agoReread the CAB header skipping the self-extracting binary code.
Joerg Sonnenberger [Thu, 1 Dec 2016 18:56:43 +0000 (19:56 +0100)] 
Reread the CAB header skipping the self-extracting binary code.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=15 as found
by the "OSS-Fuzz" project.

8 years agoRestore compatibility with Perl Archive::Tar that was broken with #825
Martin Matuska [Thu, 1 Dec 2016 14:58:06 +0000 (15:58 +0100)] 
Restore compatibility with Perl Archive::Tar that was broken with #825

8 years agoSpelling fixes (#830)
Graham Percival [Wed, 30 Nov 2016 21:46:10 +0000 (13:46 -0800)] 
Spelling fixes (#830)

* Spelling: previos -> previous

Sponsored by: Tarsnap Backup Inc.

* Spelling: Preparre -> Prepare

Sponsored by: Tarsnap Backup Inc.

* Spelling: Invalide -> Invalid

Sponsored by: Tarsnap Backup Inc.

* Spelling: leagal -> legal

Sponsored by: Tarsnap Backup Inc.

* Spelling: lengthe -> length

Sponsored by: Tarsnap Backup Inc.

* Spelling: cotents -> contents

Sponsored by: Tarsnap Backup Inc.

* Spelling: travesal -> traversal

Sponsored by: Tarsnap Backup Inc.

* Spelling: functinos -> functions

Sponsored by: Tarsnap Backup Inc.

* Spelling: particluar -> particular

Sponsored by: Tarsnap Backup Inc.

* Spelling: uncapable -> incapable

Sponsored by: Tarsnap Backup Inc.

8 years agoMerge pull request #819 from andrewgregory/mtree-hashtable
Martin Matuška [Wed, 30 Nov 2016 15:45:48 +0000 (16:45 +0100)] 
Merge pull request #819 from andrewgregory/mtree-hashtable

mtree: use hash table for duplicate entry search

8 years agoAdd test archives from #825 to Makefile.am
Martin Matuska [Tue, 29 Nov 2016 21:59:19 +0000 (22:59 +0100)] 
Add test archives from #825 to Makefile.am

8 years agoFix extracting hardlinks over symlinks
Martin Matuska [Tue, 29 Nov 2016 15:55:41 +0000 (16:55 +0100)] 
Fix extracting hardlinks over symlinks

Closes #821

8 years agoarchive_write_disk_posix.c: make *_fsobj functions more readable
Martin Matuska [Tue, 29 Nov 2016 15:47:37 +0000 (16:47 +0100)] 
archive_write_disk_posix.c: make *_fsobj functions more readable

8 years agoStyle fixes in archive_write_disk_posix.c
Martin Matuska [Tue, 29 Nov 2016 14:08:13 +0000 (15:08 +0100)] 
Style fixes in archive_write_disk_posix.c

8 years agoAdd archive_entry_acl_types() to check ACL types in an entry's ACL
Martin Matuska [Wed, 23 Nov 2016 23:17:17 +0000 (00:17 +0100)] 
Add archive_entry_acl_types() to check ACL types in an entry's ACL

8 years agoMerge pull request #825 from josusky/master
Tim Kientzle [Wed, 23 Nov 2016 21:54:56 +0000 (13:54 -0800)] 
Merge pull request #825 from josusky/master

Add sanity check of tar "uid, "gid" and "mtime" fields

8 years agoAllow tar header fields without null terminator 825/head
Jan Osusky [Wed, 23 Nov 2016 19:24:38 +0000 (20:24 +0100)] 
Allow tar header fields without null terminator

The "archive_read_format_tar_bid" and related "validate_number_field"
were revisited to allow one more non-standard way of coding UID/GID
and similar number fields in the tar header.
Modified "test_compat_gtar" to verify reading of such value.

8 years agoAdd missing check for acl_is_trivial_np() to configure.ac
Martin Matuska [Wed, 23 Nov 2016 16:52:03 +0000 (17:52 +0100)] 
Add missing check for acl_is_trivial_np() to configure.ac

8 years agoReset acl_types in archive_acl_clear()
Martin Matuska [Wed, 23 Nov 2016 15:45:47 +0000 (16:45 +0100)] 
Reset acl_types in archive_acl_clear()

8 years agoAdd test of GNU tar with GID greater 10000000 octal
Jan Osusky [Tue, 22 Nov 2016 17:29:17 +0000 (18:29 +0100)] 
Add test of GNU tar with GID greater 10000000 octal

GNU tar encodes such field as base256 (raw binary).

8 years agoAdd test of raw file which fooled tar
Jan Osusky [Tue, 22 Nov 2016 17:17:31 +0000 (18:17 +0100)] 
Add test of raw file which fooled tar

Added test with raw file (truncated to 4kB) which was mis-detected
as tar and caused quite an issue. The file was originally compressed
that's why any libarchive functionality was used on it but the
key issue was the similarity of the raw data to a tar file header.
The data is a BUFR bulletin in WMO FTP file format.

8 years agoMake sanity check of UID/GID/... fields compatible GNU TAR
Jan Osusky [Tue, 22 Nov 2016 15:19:25 +0000 (16:19 +0100)] 
Make sanity check of UID/GID/... fields compatible GNU TAR

The GNU tar uses a nasty trick to overcome size limitation of certain fields.
If the value is reasonable it uses octal numbers but if the value is too big,
e.g. 2097152 (10000000 octal) for UID, then it switches to base265 encoding
(i.e. raw binary representation of the corresponding integer).
Now the sanity check in "archive_read_format_tar_bid" uses helper function
validate_number_field() which validates what can be validated.

8 years agoAdd support for building with OpenSSL 1.1 826/head
Tomas Mraz [Thu, 17 Nov 2016 20:44:44 +0000 (15:44 -0500)] 
Add support for building with OpenSSL 1.1

OpenSSL 1.1 made some CTX structures opaque.  Port our code to use the
structures only through pointers via OpenSSL 1.1 APIs.  Use our adaption
layer to make this work with OpenSSL 1.0 and below.

Closes: #810
Patch-from: https://bugzilla.redhat.com/1383744

8 years agoAdd infrastructure to adapt between OpenSSL 1.1 and older versions
Brad King [Thu, 17 Nov 2016 20:26:41 +0000 (15:26 -0500)] 
Add infrastructure to adapt between OpenSSL 1.1 and older versions

Add private forwarding headers for `openssl/{evp,hmac}.h` to give us a
central place to add adaptation code to work across multiple
incompatible OpenSSL versions.  Provide compatibility implementations of
some OpenSSL 1.1 APIs when using older OpenSSL versions.

8 years agoFix return code of ci_build.sh if tests fail with autotools
Martin Matuska [Thu, 17 Nov 2016 23:17:31 +0000 (00:17 +0100)] 
Fix return code of ci_build.sh if tests fail with autotools

8 years agoDo not treat user or group ACL entries without an id as identical
Martin Matuska [Mon, 14 Nov 2016 21:09:54 +0000 (22:09 +0100)] 
Do not treat user or group ACL entries without an id as identical
Add compat test for star archives with POSIX.1e ACLs

8 years agoAdd sanity check of tar "uid, "gid" and "mtime" fields
Jan Osusky [Mon, 14 Nov 2016 10:24:35 +0000 (11:24 +0100)] 
Add sanity check of tar "uid, "gid" and "mtime" fields

Sometimes a bz2 file is identified as tar.bz2, i.e. a chunk of
raw data may look like a tar header (metadata block).
To reduce chance of such false positive, the format of uid, gid
and mtime field is checked. This fields are expected to contain
octal numbers. In fact, also space and '\0' are allowed - perhaps
I am too liberal.

8 years agoci_build: be more verbose on test errors if building with autotools
Martin Matuska [Mon, 7 Nov 2016 14:52:36 +0000 (15:52 +0100)] 
ci_build: be more verbose on test errors if building with autotools

8 years agoUnbreak build with Linux kernels older than 3.8
Martin Matuska [Mon, 7 Nov 2016 14:38:30 +0000 (15:38 +0100)] 
Unbreak build with Linux kernels older than 3.8

8 years agoSupport SEEK_HOLE under Linux, fallback to FIEMAP
Martin Matuska [Wed, 26 Oct 2016 21:18:37 +0000 (23:18 +0200)] 
Support SEEK_HOLE under Linux, fallback to FIEMAP

Closes #814

8 years agomtree: use hash table for duplicate entry search 819/head
Andrew Gregory [Tue, 1 Nov 2016 16:42:14 +0000 (12:42 -0400)] 
mtree: use hash table for duplicate entry search

Because mtree combines multiple non-adjacent entries for the same file,
parse_file() has to compare every entry to every other entry.  For large
mtree files, this results in extremely long parse times.  By breaking
the entries down into a hash table, the number of comparisons required
can be drastically reduced.  The hash function was taken directly from
the standard user/group lookup code.

8 years agoAddl lzo2 to Travis CI builds (lz4 on Ubuntu 14.04 is unsupported)
Martin Matuska [Tue, 1 Nov 2016 10:07:56 +0000 (11:07 +0100)] 
Addl lzo2 to Travis CI builds (lz4 on Ubuntu 14.04 is unsupported)

8 years agoAdd libmzmadec removal to NEWS
Martin Matuska [Tue, 1 Nov 2016 10:07:25 +0000 (11:07 +0100)] 
Add libmzmadec removal to NEWS

8 years agoMerge pull request #809 from praiskup/distribute-readme-md
Tim Kientzle [Sat, 29 Oct 2016 05:10:08 +0000 (22:10 -0700)] 
Merge pull request #809 from praiskup/distribute-readme-md

distribute README.md

8 years agoRemove support for liblzmadec and use FindLibLZMA 806/head
Martin Matuska [Mon, 17 Oct 2016 11:02:21 +0000 (13:02 +0200)] 
Remove support for liblzmadec and use FindLibLZMA

Closes #806

8 years agolibarchive 3.3 development, restore DEV_CFLAGS
Martin Matuska [Tue, 25 Oct 2016 22:02:29 +0000 (00:02 +0200)] 
libarchive 3.3 development, restore DEV_CFLAGS

8 years agodistribute README.md 809/head
Pavel Raiskup [Tue, 25 Oct 2016 12:30:31 +0000 (14:30 +0200)] 
distribute README.md

This issue happened because 'foreign' automake option is enabled,
and the file README was renamed as README.md (not included
automatically by automake).

8 years agoAdd missing define to libarchive/config_freebsd.h
Martin Matuska [Mon, 24 Oct 2016 14:04:37 +0000 (16:04 +0200)] 
Add missing define to libarchive/config_freebsd.h

8 years agoLibarchive 3.2.2 v3.2.2
Tim Kientzle [Mon, 24 Oct 2016 03:37:27 +0000 (20:37 -0700)] 
Libarchive 3.2.2

8 years agoClarify some skipping messages
Tim Kientzle [Mon, 24 Oct 2016 03:10:57 +0000 (20:10 -0700)] 
Clarify some skipping messages

8 years agoSkip gzip format check when both zlib and gzip are missing
Tim Kientzle [Mon, 24 Oct 2016 03:10:30 +0000 (20:10 -0700)] 
Skip gzip format check when both zlib and gzip are missing

8 years agoDo not try to redirect stderr on Windows
Tim Kientzle [Sun, 23 Oct 2016 23:24:00 +0000 (16:24 -0700)] 
Do not try to redirect stderr on Windows

8 years agoSkip Zip high-compression test if zlib is not available
Tim Kientzle [Sun, 23 Oct 2016 23:23:39 +0000 (16:23 -0700)] 
Skip Zip high-compression test if zlib is not available

8 years agoMake test output more verbose on Windows
Tim Kientzle [Sun, 23 Oct 2016 23:23:04 +0000 (16:23 -0700)] 
Make test output more verbose on Windows

8 years agoSync up the test harnesses, fix an "unused var" warning on Windows
Tim Kientzle [Sun, 23 Oct 2016 22:21:59 +0000 (15:21 -0700)] 
Sync up the test harnesses, fix an "unused var" warning on Windows

8 years agoIssue #800: skip 747 test when bzlib is not built
Tim Kientzle [Sun, 23 Oct 2016 21:36:33 +0000 (14:36 -0700)] 
Issue #800: skip 747 test when bzlib is not built

8 years agoSwitch Travis CI build to use the Ubuntu trusty image
Martin Matuska [Mon, 17 Oct 2016 12:07:55 +0000 (14:07 +0200)] 
Switch Travis CI build to use the Ubuntu trusty image

8 years agoMerge branch 'master' of github.com:libarchive/libarchive
Tim Kientzle [Sun, 16 Oct 2016 16:44:48 +0000 (09:44 -0700)] 
Merge branch 'master' of github.com:libarchive/libarchive

8 years agoAdd build/ci_build.sh for automatic building on Travis CI, Jenkins, etc.
Martin Matuska [Fri, 14 Oct 2016 12:31:23 +0000 (14:31 +0200)] 
Add build/ci_build.sh for automatic building on Travis CI, Jenkins, etc.
Add autotools build to .travis.yml
Downgrade minimal supported autoconf version to 2.68 (Travis CI)

8 years agotest_read_append_filter_wrong_program: check return value of freopen()
Martin Matuska [Fri, 14 Oct 2016 13:25:13 +0000 (15:25 +0200)] 
test_read_append_filter_wrong_program: check return value of freopen()

8 years agoAdd missing test archives to Makefile.am
Martin Matuska [Fri, 14 Oct 2016 10:27:43 +0000 (12:27 +0200)] 
Add missing test archives to Makefile.am

8 years agoRedirect and verify stderr in test_read_append_filter_wrong_program
Martin Matuska [Thu, 13 Oct 2016 10:36:00 +0000 (12:36 +0200)] 
Redirect and verify stderr in test_read_append_filter_wrong_program

8 years agoFix compiler warning about unused cache variable (#804)
Benjamin Sergeant [Thu, 13 Oct 2016 00:21:29 +0000 (17:21 -0700)] 
Fix compiler warning about unused cache variable (#804)

* Fix compiler warning about unused cache variable

8 years agoAdd test case for issue #794
Martin Matuska [Tue, 11 Oct 2016 22:29:07 +0000 (00:29 +0200)] 
Add test case for issue #794

8 years agoIssue #801: close the file descriptor when testing link counts
Tim Kientzle [Wed, 12 Oct 2016 01:38:44 +0000 (18:38 -0700)] 
Issue #801:  close the file descriptor when testing link counts

Thanks to Ed Maste for reporting this leak.
Found by: Coverity

8 years agoMerge pull request #798 from oshogbo/master
Martin Matuška [Sat, 8 Oct 2016 20:41:37 +0000 (22:41 +0200)] 
Merge pull request #798 from oshogbo/master

Fix small style issue.

8 years agoRemove unneeded return. 798/head
Mariusz Zaborski [Fri, 7 Oct 2016 19:37:55 +0000 (21:37 +0200)] 
Remove unneeded return.

8 years agoStyle.
Mariusz Zaborski [Fri, 7 Oct 2016 19:34:24 +0000 (21:34 +0200)] 
Style.

8 years agoProperly free and close when exiting write_hierarchy() on failed
Martin Matuska [Tue, 4 Oct 2016 10:09:28 +0000 (12:09 +0200)] 
Properly free and close when exiting write_hierarchy() on failed
archive_read_next_header2().

Fixes #794

8 years agoMerge pull request #791 from hartzell/bug/disk-variable-masked
Tim Kientzle [Mon, 3 Oct 2016 00:38:07 +0000 (17:38 -0700)] 
Merge pull request #791 from hartzell/bug/disk-variable-masked

Fix scoping error with "disk" variable

8 years agoFix scoping error with "disk" variable 791/head
George Hartzell [Thu, 29 Sep 2016 21:30:44 +0000 (14:30 -0700)] 
Fix scoping error with "disk" variable

The variable named 'disk' inside the loop was hiding the variable named
'disk' at the outer level.  The outer variable was never used, get rid
of it.

Move the call to archive_read_disk_set_standard_lookup(disk) inside the
loop so that it Does What It Should.

8 years agoMerge pull request #790 from Tarsnap/uninitialized-subst-result
Tim Kientzle [Thu, 29 Sep 2016 04:09:29 +0000 (21:09 -0700)] 
Merge pull request #790 from Tarsnap/uninitialized-subst-result

Initialize subst rule->result pointer to NULL

8 years agoInitialize subst rule->result pointer to NULL 790/head
Graham Percival [Wed, 28 Sep 2016 18:02:34 +0000 (11:02 -0700)] 
Initialize subst rule->result pointer to NULL

This is not directly useful in libarchive at the present time, but
it might be in the future.  If a project which uses this code adds
an atexit(3) handler to clean up memory, and somebody runs:
    bsdtar somestring -t
then "omestring" will be interpreted as an (invalid) substitution
rule and call lafe_errc().  However, if the atexit() handler then
calls cleanup_substition(), it will try to free(rule->result)
which was not initialized.

Sponsored by: Tarsnap Backup Inc.

8 years agoMerge pull request #787 from praiskup/fix-umask
Tim Kientzle [Wed, 28 Sep 2016 13:30:51 +0000 (06:30 -0700)] 
Merge pull request #787 from praiskup/fix-umask

tests: fix testsuite for umask issues

8 years agoMerge pull request #788 from Tarsnap/check-test-mode
Tim Kientzle [Wed, 28 Sep 2016 13:29:41 +0000 (06:29 -0700)] 
Merge pull request #788 from Tarsnap/check-test-mode

Check test mode

8 years agoAdd chmod() after make_{dir,file} in test suites 788/head
Graham Percival [Mon, 26 Sep 2016 19:50:29 +0000 (12:50 -0700)] 
Add chmod() after make_{dir,file} in test suites

This is the same change that
    38b3f516df865e2dffd0a1bbc9feb923ab2efc38
made to
    libarchive/test/main.c
, but now applied to:
    cat/test/main.c
    cpio/test/main.c
    tar/test/main.c

Sponsored by: Tarsnap Backup Inc.

8 years agoAdd and use assertion_file_mode() in other tests
Graham Percival [Mon, 26 Sep 2016 19:20:25 +0000 (12:20 -0700)] 
Add and use assertion_file_mode() in other tests

This adds the assertion_file_mode() function from
    libarchive/test/main.c
and applies it to
    cat/test/main.c
    cpio/test/main.c
    tar/test/main.c

Sponsored by: Tarsnap Backup Inc.

8 years agotests: fix testsuite for umask issues 787/head
Pavel Raiskup [Mon, 26 Sep 2016 10:56:52 +0000 (12:56 +0200)] 
tests: fix testsuite for umask issues

Reproducible with umask 0077.

Resolves: #782

8 years ago"bunzip2 -V" does not exit with 0, use "bunzip2 -h" instead
Martin Matuska [Sun, 25 Sep 2016 00:03:23 +0000 (02:03 +0200)] 
"bunzip2 -V" does not exit with 0, use "bunzip2 -h" instead

8 years agoAdd READ_DATA dir permission to @owner to make test cleanup work for non-root
Martin Matuska [Sat, 24 Sep 2016 23:30:34 +0000 (01:30 +0200)] 
Add READ_DATA dir permission to @owner to make test cleanup work for non-root

8 years agoMerge pull request #774 from Tarsnap/check-test-mode
Tim Kientzle [Sat, 24 Sep 2016 21:07:33 +0000 (14:07 -0700)] 
Merge pull request #774 from Tarsnap/check-test-mode

chmod and check the mode after creating a file or dir

8 years agoIssue 780: Extend the ISO9660 test with deeper heirarchies
Tim Kientzle [Sat, 24 Sep 2016 18:45:20 +0000 (11:45 -0700)] 
Issue 780: Extend the ISO9660 test with deeper heirarchies

8 years agoIssue 774, 782: chmod() after creating a file or dir 774/head
Graham Percival [Fri, 23 Sep 2016 17:56:21 +0000 (10:56 -0700)] 
Issue 774, 782: chmod() after creating a file or dir

If the user's system has a default umask, then
    mkdir(pathname, mode);
will report "success" even if the created dir does not match the specified
mode.  Presumably that is desired in the general case, but when it comes to
testing libarchive this can generate false errors in `make check`.

chmod() is not affected by umask, so we call that after creating the file
or directory.

Sponsored by: Tarsnap Backup Inc.

8 years agoIssue 761: Heap overflow reading corrupted 7Zip files
Tim Kientzle [Mon, 19 Sep 2016 01:14:58 +0000 (18:14 -0700)] 
Issue 761:  Heap overflow reading corrupted 7Zip files

The sample file that demonstrated this had multiple 'EmptyStream'
attributes.  The first one ended up being used to calculate
certain statistics, then was overwritten by the second which
was incompatible with those statistics.

The fix here is to reject any header with multiple EmptyStream
attributes.  While here, also reject headers with multiple
EmptyFile, AntiFile, Name, or Attributes markers.

8 years agoMerge branch 'master' of github.com:libarchive/libarchive
Tim Kientzle [Mon, 19 Sep 2016 00:31:24 +0000 (17:31 -0700)] 
Merge branch 'master' of github.com:libarchive/libarchive

8 years agoIssue 747 (and others?): Avoid OOB read when parsing multiple long lines
Tim Kientzle [Mon, 19 Sep 2016 00:27:47 +0000 (17:27 -0700)] 
Issue 747 (and others?):  Avoid OOB read when parsing multiple long lines

The mtree bidder needs to look several lines ahead
in the input.  It does this by extending the read-ahead
and parsing subsequent lines from the same growing buffer.
A bookkeeping error when extending the read-ahead would
sometimes lead it to significantly over-count the
size of the line being read.

8 years agoMerge pull request #781 from praiskup/build-fix-undeclared-var
Tim Kientzle [Mon, 12 Sep 2016 13:21:48 +0000 (06:21 -0700)] 
Merge pull request #781 from praiskup/build-fix-undeclared-var

ftbfs: declare 'r' variable for non NFSv4 ACLs too

8 years agoftbfs: declare 'r' variable for non NFSv4 ACLs too 781/head
Pavel Raiskup [Mon, 12 Sep 2016 11:58:53 +0000 (13:58 +0200)] 
ftbfs: declare 'r' variable for non NFSv4 ACLs too

8 years agoMerge branch 'master' of github.com:libarchive/libarchive
Tim Kientzle [Mon, 12 Sep 2016 01:38:32 +0000 (18:38 -0700)] 
Merge branch 'master' of github.com:libarchive/libarchive

8 years agoUse O_NOFOLLOW to avoid traversing symlinks when restoring data-carrying hardlinks.
Tim Kientzle [Sun, 11 Sep 2016 21:33:30 +0000 (14:33 -0700)] 
Use O_NOFOLLOW to avoid traversing symlinks when restoring data-carrying hardlinks.

TODO: Consider using this flag in other situations as well.

Thanks to Pavel Raiskup.

8 years agoReject non-regular sparse files
Tim Kientzle [Sun, 11 Sep 2016 21:20:31 +0000 (14:20 -0700)] 
Reject non-regular sparse files

Thanks to Pavel Raiskup

8 years agoRemove dead comments
Tim Kientzle [Sun, 11 Sep 2016 21:13:52 +0000 (14:13 -0700)] 
Remove dead comments

8 years agoFixes for Issue #745 and Issue #746 from Doran Moppert.
Tim Kientzle [Sun, 11 Sep 2016 20:21:57 +0000 (13:21 -0700)] 
Fixes for Issue #745 and Issue #746 from Doran Moppert.

8 years agoFix the test cases for Issue #745 and Issue #746
Tim Kientzle [Sun, 11 Sep 2016 20:19:05 +0000 (13:19 -0700)] 
Fix the test cases for Issue #745 and Issue #746

Thanks to Doran Moppert for pointing out the inconsistencies here.

8 years agoMerge pull request #775 from mmatuska/glibc_2_24_readdir_r
Tim Kientzle [Sat, 10 Sep 2016 17:05:55 +0000 (10:05 -0700)] 
Merge pull request #775 from mmatuska/glibc_2_24_readdir_r

Glibc 2.24 deprecates readdir_r()

8 years agoMerge pull request #779 from nacho/fix-769
Tim Kientzle [Fri, 9 Sep 2016 06:51:39 +0000 (23:51 -0700)] 
Merge pull request #779 from nacho/fix-769

test_write_format_gnutar_filenames: use AE_IFLNK instead of S_IFLNK

8 years agotest_write_format_gnutar_filenames: use AE_IFLNK instead of S_IFLNK 779/head
Ignacio Casal Quinteiro [Thu, 8 Sep 2016 12:53:18 +0000 (14:53 +0200)] 
test_write_format_gnutar_filenames: use AE_IFLNK instead of S_IFLNK

Since S_IFLNK will fail on windows.

https://github.com/libarchive/libarchive/issues/769