summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #1806 from kikht/share-writeMartin Matuška2022-12-071-6/+12
|\ | | | | Use FILE_SHARE_WRITE and FILE_SHARE_DELETE when opening files on Windows
| * Use FILE_SHARE_WRITE and FILE_SHARE_DELETE when opening files on WindowsVladimir Kikhtenko2022-11-181-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | Many standard libraries( [libc++](https://github.com/llvm/llvm-project/blob/main/libcxx/src/filesystem/posix_compat.h#L159), [go](https://cs.opensource.google/go/go/+/refs/tags/go1.19.3:src/syscall/syscall_windows.go;l=331), [rust](https://doc.rust-lang.org/src/std/os/windows/fs.rs.html#126-131) ) open files on windows with `FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE` mode by default. Libarchive uses only `FILE_SHARE_READ`, so when file is being opened by any program that uses these standard libraries libarchive fails to open it. Here we change libarchive shared flags, so it plays well with common practice in other programs.
* | Merge pull request #1771 from ↵Martin Matuška2022-12-061-0/+3
|\ \ | | | | | | | | | | | | EwgeniWolowik/extend_cleanup_pathname_by_windows_remote_path Fixed issue #1770: base dir deals with network drive paths like \\server\file
| * | Fixed issue #1770: cleanup_pathname deals with network drive paths like ↵Ewgeni Wolowik2022-09-071-0/+3
| | | | | | | | | | | | \\server\file
* | | Merge pull request #1802 from banjiuqingshan/masterMartin Matuška2022-12-061-0/+1
|\ \ \ | | | | | | | | free mstr to fix memory leaks
| * | | free mstr to fix memory leaksbanjiuqingshan2022-11-151-0/+1
| | |/ | |/| | | | free mstr to fix memory leaks.#1801
* | | Merge pull request #1772 from bgermann/masterMartin Matuška2022-12-061-0/+14
|\ \ \ | | | | | | | | archive_entry_pathname() tries UTF-8 if MBS returns EILSEQ
| * | | archive_entry_pathname() tries UTF-8 if MBS returns EILSEQJohn Reiser2022-08-261-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | For better pathname portability across OS, in particular Windows to Linux. Original bug: unrar in https://bugzilla.redhat.com/show_bug.cgi?id=2120926 modified: libarchive/archive_entry.c
* | | | Merge pull request #1793 from flyingdutchman23/fix-cmake-warningMartin Matuška2022-12-062-3/+4
|\ \ \ \ | | | | | | | | | | Fix CMake warning
| * | | | Fix CMake warningJoris Clement2022-10-282-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The warnings occurs at least with CMake version 3.24. It is caused by CMake trying to find the gcc library due to case sensitivity. The warning message was: ``` CMake Warning (dev) at /usr/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:438 (message): The package name passed to `find_package_handle_standard_args` (LIBGCC) does not match the name of the calling package (LibGCC). This can lead to problems in calling code that expects `find_package` result variables (e.g., `_FOUND`) to follow a certain pattern. Call Stack (most recent call first): build/cmake/FindLibGCC.cmake:17 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:1269 (FIND_PACKAGE) This warning is for project developers. Use -Wno-dev to suppress it. ```
* | | | | Merge pull request #1805 from banjiuqingshan/sync-masterMartin Matuška2022-12-061-0/+1
|\ \ \ \ \ | |_|_|/ / |/| | | | use regfree to release the memory
| * | | | use regfree to release the memorybanjiuqingshan2022-11-181-0/+1
|/ / / / | | | | | | | | use regfree() to release the memory requested by the regular expression.#1804
* | | | Merge pull request #1790 from jvoisin/extend_nocrcerrMartin Matuška2022-11-029-0/+38
|\ \ \ \ | | | | | | | | | | Extend the usage of the DONT_FAIL_ON_CRC_ERROR macro
| * | | | Extend the usage of the DONT_FAIL_ON_CRC_ERROR macroJulien Voisin2022-10-169-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DONT_FAIL_ON_CRC_ERROR is already used in the rar5 support code, so let's make use of it in another places as well. This should tremendously help with fuzzing.
* | | | | Merge pull request #1786 from Malterlib/oob-windows-symlinksMartin Matuška2022-11-022-0/+5
|\ \ \ \ \ | | | | | | | | | | | | Fix Windows symlink checks can reads past end of string
| * | | | | Fix out of bounds read in Windows symlink supportErik Olofsson2022-10-061-0/+2
| | | | | |
| * | | | | Fix potential out-of-bounds readsErik Olofsson2022-10-062-0/+3
| |/ / / /
* | | | | Merge pull request #1797 from neheb/aTim Kientzle2022-11-011-24/+24
|\ \ \ \ \ | |_|/ / / |/| | | | cmake config ${} to @@
| * | | | cmake config ${} to @@Rosen Penev2022-11-011-24/+24
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | meson's cmake config file handling does not support mixing ${} and @@ in the same file. Switch to @@ for consistency. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* | | | Merge pull request #1784 from vtorri/vtorri_win10_2Martin Matuška2022-10-191-1/+1
|\ \ \ \ | |/ / / |/| | | cmake: set WINDOWS_VERSION to WIN10 by default
| * | | cmake: set WINDOWS_VERSION to WIN10 by defaultVincent Torri2022-10-011-1/+1
|/ / /
* | | Merge pull request #1721 from wangkerong/masterTim Kientzle2022-10-011-1/+1
|\ \ \ | | | | | | | | libarchive:uninitialized value
| * | | libarchive:uninitialized valuewangkerong2022-04-091-1/+1
| | | | | | | | | | | | Uninitialized variable crash error in oss_fuzz memory type test
* | | | Merge pull request #1777 from vtorri/vtorri_win10_1Tim Kientzle2022-10-011-3/+7
|\ \ \ \ | | | | | | | | | | cmake: update possible values of WINDOWS_VERSION to also support Windows 10
| * | | | cmake: update possible values of WINDOWS_VERSION to also support Windows 10Vincent Torri2022-09-201-3/+7
| | |_|/ | |/| |
* | | | Merge pull request #1783 from vangyzen/issue1782Tim Kientzle2022-10-012-1/+31
|\ \ \ \ | | | | | | | | | | Support reading mtree files with tabs
| * | | | Support reading mtree files with tabsEric van Gyzen2022-09-302-1/+31
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 45c5008c4 requires all characters in an mtree file to be printable, as determined by `isprint()`. This broke support for reading mtree files with tab characters, which are valid and otherwise supported by libarchive. Allow them. Add a unit test. Fixes #1782
* | | | Merge pull request #1781 from neheb/pkgconfighTim Kientzle2022-10-011-2/+7
|\ \ \ \ | |/ / / |/| | | cmake: use pkgconfig for zstd lookup
| * | | cmake: use pkgconfig for zstd lookupRosen Penev2022-09-301-2/+7
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | As libzstd typically comes with a pkgconfig file, use it. Fixes compilation at least on OpenWrt where host paths were leaking into the build. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* | | Merge pull request #1736 from uckelman-sf/mingw_fixesMartin Matuška2022-09-052-3/+41
|\ \ \ | |_|/ |/| | Fixes for running tests on Windows (or Wine)
| * | Clean up the condition so we check EINVAL on Windows only.Joel Uckelman2022-06-301-6/+11
| | |
| * | Skip match_time tests when running on Windows, since the ctime can't be setZack Weger2022-06-011-0/+30
| | |
| * | Files with invalid names don't exist, so don't set an errorZack Weger2022-06-011-1/+4
| | |
* | | Merge pull request #1761 from kraj/masterTim Kientzle2022-08-041-3/+2
|\ \ \ | | | | | | | | libarchive: Remove unneeded linux/fs.h include
| * | | libarchive: Do not include sys/mount.h when linux/fs.h is presentKhem Raj2022-07-271-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These headers are in conflict and only one is needed by archive_read_disk_posix.c therefore include linux/fs.h if it exists otherwise include sys/mount.h It also helps compiling with glibc 2.36 where sys/mount.h conflicts with linux/mount.h see [1] [1] https://sourceware.org/glibc/wiki/Release/2.36
* | | | Merge pull request #1745 from bobrofon/rar5-read_data_blockTim Kientzle2022-08-042-1/+31
|\ \ \ \ | | | | | | | | | | rar5: Fix random initial offset if using archive_read_data_into_fd
| * | | | rar5: Fix random initial offset if using archive_read_data_into_fdSergey Bobrenok2022-06-302-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | archive_read_data_into_fd passes a pointer to an uninitialized variable as an output 'offset' argument into archive_read_data_block function, and expects that this variable will always be initialized inside of it. Like this: size_t size; int64_t offset; archive_read_data_block(a, &buf, &size, &offset); /* some work with offset here */ But rar5 implementation of archive_read_data_block function leaves the 'offset' argument uninitialized in one code path (if file is compressed and there are no uncompressed pending data blocks). As a result, archive_read_data_info_fd function is using an uninitialized variable as an initial offset of an output file. And in most cases it causes an appending sparse block of a random size at the beginning of the output file.
* | | | | Merge pull request #1751 from yugr/hide-symbolsTim Kientzle2022-07-315-0/+28
|\ \ \ \ \ | |_|/ / / |/| | | | Hide internal symbols on platforms that support visibility annotations
| * | | | Added missing file to CMakeLists.Yuri Gribov2022-07-271-0/+1
| | | | |
| * | | | Hide internal symbols on platforms that support visibility annotations (see ↵Yuri Gribov2022-07-274-0/+27
|/ / / / | | | | | | | | | | | | discussion in gh-1017).
* | | | Merge pull request #1753 from bungeman/check_size_attributeTim Kientzle2022-07-245-0/+109
|\ \ \ \ | | | | | | | | | | Validate entry_bytes_remaining in pax_attribute
| * | | | Validate entry_bytes_remaining in pax_attributeBen Wagner2022-07-245-0/+109
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `size` attribute may contain a negative or too large value. Check the range of the `entry_bytes_remaining` in `pax_attribute` the same way as `header_common`. The test which is added passes both with and without this change in a normal debug build. It is necessary to run with `-fsanitize=undefined` to see that the undefined behavior is avoided. Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=48467
* | | | Merge pull request #1759 from obiwac/fix-1754Tim Kientzle2022-07-231-0/+8
|\ \ \ \ | |/ / / |/| | | libarchive: Handle a `calloc` returning NULL (fixes #1754)
| * | | libarchive: Handle a `calloc` returning NULL (fixes #1754)obiwac2022-07-221-0/+8
| | | |
* | | | Merge pull request #1688 from hemnstill/zstd_windowsMartin Matuška2022-06-291-2/+23
|\ \ \ \ | |/ / / |/| | | include zstd 1.5.2 on windows ci builds
| * | | Merge branch 'libarchive:master' into zstd_windowsAlexandr Reshetnikov2022-06-193-5/+8
| |\ \ \
| * \ \ \ Merge branch 'libarchive:master' into zstd_windowsAlexandr Reshetnikov2022-06-173-9/+10
| |\ \ \ \
| * \ \ \ \ Merge remote-tracking branch 'remotes/origin/master' into zstd_windowsReshetnikov Alexandr2022-04-282-0/+5
| |\ \ \ \ \
| * \ \ \ \ \ Merge remote-tracking branch 'remotes/origin/master' into zstd_windowsReshetnikov Alexandr2022-04-129-34/+47
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # build/ci/github_actions/ci.cmd
| * | | | | | | include zstd 1.5.2 on windows buildsReshetnikov Alexandr2022-03-311-2/+23
| | | | | | | |