summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Libarchive 3.4.2v3.4.2Martin Matuska2020-02-115-4/+6
|
* Add script to generate release files with Docker.Martin Matuska2020-02-112-0/+19
|
* Unlink before creating a hardlink on WindowsMartin Matuska2020-02-111-3/+15
| | | | | | when using ARCHIVE_EXTRACT_SAFE_WRITES. Completes #1330 for Windows.
* Merge pull request #1330 from zoulasc/masterMartin Matuška2020-02-111-0/+7
|\ | | | | Fix ARCHIVE_EXTRACT_SAFE_WRITES for existing symlinks
| * Just like the hard link case, for symlinks we need to remove firstzoulasc2020-02-101-0/+7
|/ | | | for ARCHIVE_EXTRACT_SAFE_WRITES.
* Update NEWSMartin Matuska2020-02-101-0/+6
|
* RAR5 reader: use %zu to sprintf() size_tMartin Matuska2020-02-101-1/+1
|
* CI Windows: download zlib and bzip2 from cloned repositoriesMartin Matuska2020-02-091-5/+5
|
* CI: generate and publish build artifacts on GitHub actionsMartin Matuska2020-02-093-5/+37
| | | | Fixes #1313
* CI: build and use bzip2 on Windows from GiLab repositoryMartin Matuska2020-02-081-8/+34
| | | | | Use static versions of zlib and bzip2 on Windows. Simplify ci.cmd for GitHub Actions.
* Merge pull request #1329 from bradking/string-append-wcs-overflowMartin Matuška2020-02-071-1/+2
|\ | | | | Fix possible heap-buffer-overflow in archive_string_append_from_wcs on Windows
| * Fix possible heap-buffer-overflow in archive_string_append_from_wcs on WindowsBrad King2020-02-061-1/+2
| | | | | | | | | | | | Fix `archive_string_append_from_wcs_in_codepage` to account for the already-used portion of the buffer when computing the size of the remaining buffer for `WideCharToMultiByte` output.
* | RAR5 reader: do not mutate a global variableMartin Matuska2020-02-071-21/+30
| | | | | | | | | | Read RAR5 signature with a function instead. Fixes #1303
* | CI: exit with error on failure in Visual Studio stagesMartin Matuska2020-02-071-3/+3
| |
* | 7z reader: support Delta filter with values 2-256Martin Matuska2020-02-065-1/+826
|/ | | | Fixes #987
* Merge pull request #1326 from antekone/rar5_ossfuzz_20459Martin Matuška2020-02-024-2/+39
|\ | | | | RAR5 reader: reject files that declare invalid header flags
| * RAR5 reader: reject files that declare invalid header flagsGrzegorz Antoniak2020-02-024-2/+39
|/ | | | | | | | | | | | | | | One of the fields in RAR5's base block structure is the size of the header. Some invalid files declare a 0 header size setting, which can confuse the unpacker. Minimum header size for RAR5 base blocks is 7 bytes (4 bytes for CRC, and 3 bytes for the rest), so block size of 0 bytes should be rejected at header parsing stage. The fix adds an error condition if header size of 0 bytes is detected. In this case, the unpacker will not attempt to unpack the file, as the header is corrupted. The commit also adds OSSFuzz #20459 sample to test further regressions in this area.
* Merge pull request #1324 from bradking/solaris-11.4Martin Matuška2020-02-011-4/+5
|\ | | | | libarchive: Fix detection of 'major' on Solaris 11.4
| * libarchive: Fix detection of 'major' on Solaris 11.4Brad King2020-01-301-4/+5
| | | | | | | | | | | | In `archive_pack_dev.c` there is code checking the `HAVE_MAJOR` macro, but it is not computed. Port the equivalent logic from `archive_entry.c` to define the macro.
* | Fix use after free in ISO9660 and XAR writerMartin Matuska2020-02-013-12/+20
| | | | | | | | | | | | | | Remove rbtree nodes before freeing them. For better code readability import new rbtree macros from NetBSD. Fixes #1325
* | Update filter and format options in manual pages.Martin Matuska2020-01-313-57/+242
| | | | | | | | | | | | | | | | The list of format and filter options in bsdtar(1) is incomplete. Add reference to manual pages archive_write_set_options(3) and archive_read_set_options(3) for a complete list of supported options. Fixes #1323
* | mtree reader: initialize checkfs with 0Martin Matuska2020-01-311-0/+1
|/
* Cmake MSVC: replace warning C4061 with C4062Martin Matuska2020-01-281-3/+3
| | | | Fixes #1322
* test_write_format_xar: add "none" options to testMartin Matuska2020-01-261-0/+3
|
* PAX writer: fix return-on-error memory leaks in archive_write_pax_header()Martin Matuska2020-01-261-21/+64
|
* PAX writer: fix entry uname or gname longer than 32 charactersMartin Matuska2020-01-262-6/+56
| | | | Fixes #1319
* Unify unsupported entry file type error message in writerMartin Matuska2020-01-2515-64/+119
| | | | Closes #1320
* XAR writer: fix compression output buffer handlingMartin Matuska2020-01-232-10/+54
| | | | | | | Add "none" as acceptable value to xar:checksum and xar:toc-checksum Document XAR options in bsdtar(1) Fixes #1317
* CI: make mingw32-make verboseMartin Matuska2020-01-231-2/+2
|
* Add printf attributes to the printflike functions used in tests and fixzoulasc2020-01-2338-79/+106
| | | | | | the format errors. Closes #1318
* RAR5 reader: refactored parse_tables() a little bitGrzegorz Antoniak2020-01-221-21/+19
| | | | | | | Some if/continue constructs could be changed to if/elseif/else blocks. This allows elimination of superfluous 'continue' directives. Closes #1280
* Update archive_read_support_format_rar5.cMonkeybreadSoftware2020-01-221-58/+63
| | | | | A patch to make this compile in older Visual Studio. Moving variable declaration up for C89 standard.
* CI: raise error if MinGW tests failMartin Matuska2020-01-221-1/+1
|
* Fix error when overwriting files on WindowsMartin Matuska2020-01-221-15/+21
| | | | Introduced in 467d193dd61ca7669a5ba8d38e09836babf64e58
* Fix 7zip_packinfo_digests test when LZMA is not supportedMartin Matuska2020-01-222-37/+41
|
* contrib/archivetest: fix compilation under MinGWMartin Matuska2020-01-221-5/+11
|
* 7zip reader tests: fixes when LZMA is unsupportedMartin Matuska2020-01-222-3/+14
|
* bsdtar.1: --exclude-vcs sort version control systems and add gitMartin Matuska2020-01-201-6/+7
| | | | Fixes #1314
* Add test_option_safe_writes to tar testsMartin Matuska2020-01-203-0/+79
|
* Implement ARCHIVE_EXTRACT_SAFE_WRITES on WindowsMartin Matuska2020-01-202-62/+157
| | | | | | | As Windows does not support atomic rename/_wrename we have to unlink the file right before calling _wrename leaving a short unsafe window where a different file with the same name can be created and make the rename operation fail.
* Introduce archive_write_disk(3) flag ARCHIVE_EXTRACT_SAFE_WRITESzoulasc2020-01-209-34/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | This flag changes the way that regular files are extracted: Instead of removing existing files first and re-creating them in order to replace their contents, a temporary file is created and when writing to the temporary file is completed, the file is rename(2)d to the final destination name. This has the effect of presenting a consistent view of the file to the system (either the file with the new contents or the file with the old contents). Removing and overwriting the file has the undesired side effect that the the system can either not see the file at all (from the time it is being removed till the time it is being re-created), or worse it can see partial file contents. This is problematic when extracting system files (for example shared libraries). If the existing file that is going to be overwritten is a hard link, for now we unlink it before calling rename(2). This can be done correctly by creating a hardlink to a tmpnam(3) generated file and then use rename(2), but that is fairly intrusive and requires refactoring. Fixes #1289
* RAR5 reader: fix unsafe sign check of a bitwise operation.Martin Matuska2020-01-181-1/+1
| | | | | | | This has no but code correctness effect as cdeque_init() is static and max_capacity_power_of_2 in our code is always 8192. Found by LGTM.com code analysis
* archive_read.c: remove unnecessary comparsion (iindex is unsigned int)Martin Matuska2020-01-171-1/+1
| | | | Found by LGTM.com code analysis
* Merge pull request #1316 from zoulasc/testsMartin Matuška2020-01-167-18/+21
|\ | | | | Various test improvements
| * ANSI-C prototypeszoulasc2020-01-162-5/+5
| |
| * Add missing constzoulasc2020-01-161-1/+1
| |
| * Add missing constzoulasc2020-01-161-1/+1
| |
| * Add missing constzoulasc2020-01-161-1/+1
| |
| * - Add the NetBSD-specific config.hzoulasc2020-01-162-10/+13
|/ | | | | - Use --help instead of -V when -V exits with non-zero code - Double the string size to prevent truncation
* RAR5 and WARC readers: move unnecessary comparsion into a commentMartin Matuska2020-01-162-3/+9
| | | | | | RAR5 reader: comment out unreachable code Found by LGTM.com code analysis