diff options
author | Martin Matuska <mm@FreeBSD.org> | 2022-02-09 13:11:38 +0000 |
---|---|---|
committer | Martin Matuska <mm@FreeBSD.org> | 2022-02-09 13:20:23 +0000 |
commit | 84631082f67b1c1eeac6b68f11e5290354c431f8 (patch) | |
tree | 342ea3704a46ad9c78807e0e5ccfbe8485cf4ba6 /contrib | |
parent | 6c0d5e8e0e5f66cbb974dba994cb265fc89d19e8 (diff) | |
download | src-84631082f67b1c1eeac6b68f11e5290354c431f8.tar.gz src-84631082f67b1c1eeac6b68f11e5290354c431f8.zip |
Update vendor/libarchive libarchive/libarchive@9147def1d
Libarchive 3.6.0
New features:
PR #1614: tar: new option "--no-read-sparse"
PR #1503: RAR reader: filter support
PR #1585: RAR5 reader: self-extracting archive support
New features (not used in FreeBSD base):
PR #1567: tar: threads support for zstd (#1567)
PR #1518: ZIP reader: zstd decompression support
Security Fixes:
PR #1491, #1492, #1493, CVE-2021-36976:
fix invalid memory access and out of bounds read in RAR5 reader
PR #1566, #1618, CVE-2021-31566:
extended fix for following symlinks when processing the fixup list
Other notable bugfixes and improvements:
PR #1620: tar: respect "--ignore-zeros" in c, r and u modes
PR #1625: reduced size of application binaries
Obtained from: libarchive
Libarchive commit: 9147def1da7ad1bdd47b3559eb1bfeeb0e0f374b
Libarchive tag: v3.6.0
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/untar.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/contrib/untar.c b/contrib/untar.c index 3d954f638be0..2550e510a5a1 100644 --- a/contrib/untar.c +++ b/contrib/untar.c @@ -36,6 +36,10 @@ /* This is for mkdir(); this may need to be changed for some platforms. */ #include <sys/stat.h> /* For mkdir() */ +#if defined(_WIN32) && !defined(__CYGWIN__) +#include <windows.h> +#endif + /* Parse an octal number, ignoring leading and trailing nonsense. */ static int parseoct(const char *p, size_t n) @@ -78,7 +82,11 @@ create_dir(char *pathname, int mode) pathname[strlen(pathname) - 1] = '\0'; /* Try creating the directory. */ +#if defined(_WIN32) && !defined(__CYGWIN__) + r = _mkdir(pathname); +#else r = mkdir(pathname, mode); +#endif if (r != 0) { /* On failure, try creating parent directory. */ @@ -87,7 +95,11 @@ create_dir(char *pathname, int mode) *p = '\0'; create_dir(pathname, 0755); *p = '/'; +#if defined(_WIN32) && !defined(__CYGWIN__) + r = _mkdir(pathname); +#else r = mkdir(pathname, mode); +#endif } } if (r != 0) |