Graham Percival [Sun, 30 Aug 2015 17:53:12 +0000 (10:53 -0700)]
Warn if target of hard-link is not present
To reproduce,
touch a
ln a b
./bsdtar -c -f warn-hard-links.tar a b
rm a b
./bsdtar -x -f warn-hard-links.tar b
should produce a warning message about failing to create 'b' because the
hard-link target 'a' does not exist. Previously, it did not give any hints
about why 'b' could not be created.
Tim Kientzle [Thu, 27 Aug 2015 15:42:02 +0000 (08:42 -0700)]
Issue 593: Add .travis.yml for Travis-CI
This will help people who want to use Travis-CI to follow
libarchive development. Including Travis-CI status in the
README.md is a separate issue that requires one of the
libarchive maintainers to commit to managing it.
Tim Kientzle [Sun, 9 Aug 2015 04:47:43 +0000 (21:47 -0700)]
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.
Tim Kientzle [Sun, 9 Aug 2015 03:52:19 +0000 (20:52 -0700)]
Issue 551: Fix the best-effort UTF8 conversion
If a valid character set conversion is impossible, the code falls back
to a best-effort conversion that preserves ASCII bytes and converts
the rest to Unicode Replacement Characters (if the output is UTF8)
or '?' (otherwise). This code did not correctly track the remaining
bytes in the output buffer; I've replaced this with slower and simpler
code that utilizes the safe string append functions.
configure.ac: Use pkg-config to find libxml2. Fixes cross compilation
This was originally submitted to Google Code, and was carried over
during GitHub migration; however, it was in patch form, so I've made
a pull request for it for quicker merging.
Original source: https://github.com/libarchive/libarchive/issues/407
Original author: ambrop7
When you need to write a callback for archive_read_open2, you must provide a
function which has the same signature as the typedef. The documentation says
that the read callback returns a ssize_t, but on windows there is no such
ssize_t. libarchive falls back on another type and use the private macro
__LA_SSIZE_T, thus it is not possible to write portable code that use
read_open2.
This patch replaces that macro with a simple typedef la_ssize_t (and does the
same for la_int64_t).
Brooks Davis [Tue, 10 Feb 2015 17:43:10 +0000 (17:43 +0000)]
Add a new tar option --clear-nochange-fflags that causes file system
flags which might prevent the removal or modifiction of files to
be cleared before attempting to remove them.
Brooks Davis [Tue, 10 Feb 2015 17:39:51 +0000 (17:39 +0000)]
Add a new archive_write_disk option:ARCHIVE_EXTRACT_CLEAR_NOCHANGE_FFLAGS
that clears platform-specific file flags that might prevent the removal
of a file system object before attempting to remove it.
Hans Hinrichsen [Tue, 5 May 2015 03:30:01 +0000 (22:30 -0500)]
Fixes for VS2012 Compile
Updated includes in bsdtar_windows.h to bring in _setmode and _O_BINARY via io.h and fcntl.h
Explicitly cast a few void * to their structs to suppress Intellisense warnings
Moved variable in read_archive - VS2012 needs variables declared at the top of the block (does not support C99)
Hans Hinrichsen [Thu, 30 Apr 2015 03:45:31 +0000 (22:45 -0500)]
Fixes for VS2012 Compile
Fixes for VS2012 Compile
Added headers needed when compiling in Win32 without Cygwin
Some pointers needed to be explicitly cast
VS had a lot of trouble with storing the result of
archive_entry_pathname in a local variable
The only way I could get it to compile was to call the function twice
Tim Kientzle [Sun, 12 Apr 2015 06:21:43 +0000 (23:21 -0700)]
Nudge the Zip64 cutoff a little higher.
A simple test (feeding /dev/random through gzip) suggests
that deflate will only expand the data by 0.03% in the worst case.
So allow a 0.4% margin instead of the 6.25% I had here earlier.
Tim Kientzle [Sun, 12 Apr 2015 05:44:12 +0000 (22:44 -0700)]
Issue #522: Dir loop in malformed ISO causes segfault
Github Issue #522 revealed that we could blow the stack
when recursing to assemble ISO paths. I saw this happen
at 130,000 dir levels. This patch addresses this by limiting
the directory recursion to 1,000 elements.
TODO: It would be even better to track and detect the dir loop
directly.