| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
WARNS=6 on FreeBSD passes several CFLAGS that causes the previous code
to fail with `-Wincompatible-pointer-types-discards-qualifiers` when
compiled with clang.
This particular change adjusts the code to be
`-Wincompatible-pointer-types-discards-qualifiers` clean. This change
changes the calls to use OSSL_PARAM macro abbreviated calls, instead of
calling more verbose (and less documented) callers.
While here, also address a `mac` object leak if `ctx` cannot be
allocated cleanly by always free'ing `mac` after it's been attached to
`ctx`.
Co-authored-by: Pierre Pronchery <pierre@freebsdfoundation.org>
Sponsored by: The FreeBSD Foundation
Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clang 16 introduced a warning about single bit bitfields in structs,
which is triggered by a few libarchive formats:
libarchive/archive_write_set_format_7zip.c:1541:13: error: implicit
truncation from 'int' to a one-bit wide bit-field changes value from 1
to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
file->dir = 1;
^ ~
This is because single bit bitfields only support values -1 and 0, if
they are signed.
For bitfields with two or more bits this can be intentional, but single
bit bitfields are typically used as booleans, so it is better to make
them unsigned.
|
| |
|
|
|
|
|
|
| |
Now uses 33 bits (the maximum possible) in the ustar header in order
to support times out to 2106.
Fixes #1837
|
| |
|
|
|
|
|
|
|
|
|
|
| |
When the `zstd:frame-per-file` option is specified, the zstd filter will start a new frame when flushed, i.e. for each file in the archive.
The `zstd:min-frame-size=N` option modifies the `zstd:frame-per-file` option in that it will not start a new frame unless the current one exceeds `N` bytes.
When the `zstd:max-frame-size=N` option is specified, the zstd filter will start a new frame any time the compressed size of the previous one exceeds `N` bytes.
These options decrease compression efficiency by a varying amount (depending on the exact composition of its contents) but render the tarball seekable, to a certain extent.
|
|
|
|
|
|
| |
* Add a flush() method to write filters.
* Add an __archive_write_filters_flush() function which iterates over filters in order and invokes the flush method for any filter that has one and that has written data.
* Call __archive_write_filters_flush() before writing a new header.
|
| |
|
|
|
|
| |
Because at that point, you may as well replace the whole thing with
strcmp
|
|
|
|
| |
We do not need to check TIME_WITH_SYS_TIME anymore. We can check
HAVE_SYS_TIME_H and not bother checking for C99.
|
|
|
|
|
|
|
|
|
| |
Otherwise there are 32/64-bit pointer conversions going on. In Windows
since MSVC2005, time_t has been 64-bit. MinGW needs a hack to get 64-bit
time_t.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|
|
|
|
|
|
| |
These were missing from 2d329073435d36065ce30bfd29428f6a45e41016
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|
|
| |
Issue #1826
|
|
|
| |
Issue #1828
|
|
|
| |
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
| |
|
| |
|
|
|
|
| |
HMAC_*() functions have been deprecated since OpenSSL 3.0
|
|
|
|
|
| |
Reported by: GitHub CodeQL
Code Scanning Alert: 125
|
|
|
|
|
| |
Reported by: CodeQL
Code Scanning Alert: 126
|
|
|
|
|
| |
Reported by: CodeQL
Code Scanning Alert: 129
|
|
|
|
|
| |
Reported by: GitHub CodeQL
Code Scanning Alert: 190
|
|
|
|
|
| |
Reported by: GitHub CodeQL
Code Scanning Alert: 189
|
|
|
|
|
| |
Reported by: GitHub CodeQL
Code scanning alerts: 214, 215, 216
|
|
|
|
| |
Use localtime_r() or _localtime64_s() if available
|
|
|
|
| |
Found by: GitHub CodeQL
|
|\
| |
| | |
Use FILE_SHARE_WRITE and FILE_SHARE_DELETE when opening files on Windows
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| | |
| | |
| | |
| | | |
EwgeniWolowik/extend_cleanup_pathname_by_windows_remote_path
Fixed issue #1770: base dir deals with network drive paths like \\server\file
|
| | |
| | |
| | |
| | | |
\\server\file
|
|\ \ \
| | | |
| | | | |
free mstr to fix memory leaks
|
| | |/
| |/|
| | | |
free mstr to fix memory leaks.#1801
|
|\ \ \
| |/ /
|/| | |
archive_entry_pathname() tries UTF-8 if MBS returns EILSEQ
|
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\ \ \
| | | |
| | | | |
Extend the usage of the DONT_FAIL_ON_CRC_ERROR macro
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| | | | |
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
libarchive:uninitialized value
|
| | | |
| | | |
| | | | |
Uninitialized variable crash error in oss_fuzz memory type test
|
| |_|/
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\ \ \
| |_|/
|/| | |
Fixes for running tests on Windows (or Wine)
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
libarchive: Remove unneeded linux/fs.h include
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
|\ \ \ \
| | | | |
| | | | | |
rar5: Fix random initial offset if using archive_read_data_into_fd
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
| | | | | |
|