Skip to content

Commit 966d164

Browse files
committed
Merge remote-tracking branch 'remotes/origin/master' into zstd_windows
# Conflicts: # build/ci/github_actions/ci.cmd
2 parents bbec463 + 042956b commit 966d164

9 files changed

Lines changed: 47 additions & 34 deletions

File tree

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
Apr 08, 2022: libarchive 3.6.1 released
2+
13
Feb 09, 2022: libarchive 3.6.0 released
24

35
Feb 08, 2022: libarchive 3.5.3 released

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ The top-level directory contains the following information files:
3737
* **configure** - configuration script, see INSTALL for details. If your copy of the source lacks a `configure` script, you can try to construct it by running the script in `build/autogen.sh` (or use `cmake`).
3838

3939
The following files in the top-level directory are used by the 'configure' script:
40+
4041
* `Makefile.am`, `aclocal.m4`, `configure.ac` - used to build this distribution, only needed by maintainers
4142
* `Makefile.in`, `config.h.in` - templates used by configure script
4243

@@ -71,6 +72,7 @@ know about any errors or omissions you find.
7172
## Supported Formats
7273

7374
Currently, the library automatically detects and reads the following formats:
75+
7476
* Old V7 tar archives
7577
* POSIX ustar
7678
* GNU tar format (including GNU long filenames, long link names, and sparse files)
@@ -92,6 +94,7 @@ Currently, the library automatically detects and reads the following formats:
9294
* XAR archives
9395

9496
The library also detects and handles any of the following before evaluating the archive:
97+
9598
* uuencoded files
9699
* files with RPM wrapper
97100
* gzip compression
@@ -103,6 +106,7 @@ The library also detects and handles any of the following before evaluating the
103106
* zstandard compression
104107

105108
The library can create archives in any of the following formats:
109+
106110
* POSIX ustar
107111
* POSIX pax interchange format
108112
* "restricted" pax format, which will create ustar archives except for
@@ -122,6 +126,7 @@ The library can create archives in any of the following formats:
122126
* XAR archives
123127

124128
When creating archives, the result can be filtered with any of the following:
129+
125130
* uuencode
126131
* gzip compression
127132
* bzip2 compression

build/ci/github_actions/ci.cmd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@ECHO OFF
2-
SET ZLIB_VERSION=1.2.11
3-
SET BZIP2_VERSION=b7a672291188a6469f71dd13ad14f2f9a7344fc8
2+
SET ZLIB_VERSION=1.2.12
3+
SET BZIP2_VERSION=1ea1ac188ad4b9cb662e3f8314673c63df95a589
44
SET XZ_VERSION=5.2.5
55
SET ZSTD_VERSION=1.5.2
66
IF NOT "%BE%"=="mingw-gcc" (
@@ -108,11 +108,11 @@ IF "%1"=="deplibs" (
108108
SET PATH=%MINGWPATH%
109109
MKDIR build_ci\cmake
110110
CD build_ci\cmake
111-
cmake -G "MinGW Makefiles" -D ZLIB_LIBRARY="C:/Program Files (x86)/zlib/lib/libzlibstatic.a" -D ZLIB_INCLUDE_DIR="C:/Program Files (x86)/zlib/include" -D BZIP2_LIBRARIES="C:/Program Files (x86)/bzip2/lib/libbz2.a" -D BZIP2_INCLUDE_DIR="C:/Program Files (x86)/bzip2/include" -D LIBLZMA_LIBRARY="C:/Program Files (x86)/xz/lib/liblzma.a" -D LIBLZMA_INCLUDE_DIR="C:/Program Files (x86)/xz/include" -D ZSTD_LIBRARY="C:/Program Files (x86)/zstd/lib/libzstd.a" -D ZSTD_INCLUDE_DIR="C:/Program Files (x86)/zstd/include" ..\.. || EXIT /b 1
111+
cmake -G "MinGW Makefiles" -D ZLIB_LIBRARY="C:/Program Files (x86)/zlib/lib/libzlibstatic.a" -D ZLIB_INCLUDE_DIR="C:/Program Files (x86)/zlib/include" -D BZIP2_LIBRARIES="C:/Program Files (x86)/bzip2/lib/libbz2_static.a" -D BZIP2_INCLUDE_DIR="C:/Program Files (x86)/bzip2/include" -D LIBLZMA_LIBRARY="C:/Program Files (x86)/xz/lib/liblzma.a" -D LIBLZMA_INCLUDE_DIR="C:/Program Files (x86)/xz/include" -D ZSTD_LIBRARY="C:/Program Files (x86)/zstd/lib/libzstd.a" -D ZSTD_INCLUDE_DIR="C:/Program Files (x86)/zstd/include" ..\.. || EXIT /b 1
112112
) ELSE IF "%BE%"=="msvc" (
113113
MKDIR build_ci\cmake
114114
CD build_ci\cmake
115-
cmake -G "Visual Studio 17 2022" -D CMAKE_BUILD_TYPE="Release" -D ZLIB_LIBRARY="C:/Program Files (x86)/zlib/lib/zlibstatic.lib" -D ZLIB_INCLUDE_DIR="C:/Program Files (x86)/zlib/include" -D BZIP2_LIBRARIES="C:/Program Files (x86)/bzip2/lib/bz2.lib" -D BZIP2_INCLUDE_DIR="C:/Program Files (x86)/bzip2/include" -D LIBLZMA_LIBRARY="C:/Program Files (x86)/xz/lib/liblzma.lib" -D LIBLZMA_INCLUDE_DIR="C:/Program Files (x86)/xz/include" -D ZSTD_LIBRARY="C:/Program Files (x86)/zstd/lib/zstd_static.lib" -D ZSTD_INCLUDE_DIR="C:/Program Files (x86)/zstd/include" ..\.. || EXIT /b 1
115+
cmake -G "Visual Studio 17 2022" -D CMAKE_BUILD_TYPE="Release" -D ZLIB_LIBRARY="C:/Program Files (x86)/zlib/lib/zlibstatic.lib" -D ZLIB_INCLUDE_DIR="C:/Program Files (x86)/zlib/include" -D BZIP2_LIBRARIES="C:/Program Files (x86)/bzip2/lib/bz2_static.lib" -D BZIP2_INCLUDE_DIR="C:/Program Files (x86)/bzip2/include" -D LIBLZMA_LIBRARY="C:/Program Files (x86)/xz/lib/liblzma.lib" -D LIBLZMA_INCLUDE_DIR="C:/Program Files (x86)/xz/include" -D ZSTD_LIBRARY="C:/Program Files (x86)/zstd/lib/zstd_static.lib" -D ZSTD_INCLUDE_DIR="C:/Program Files (x86)/zstd/include" ..\.. || EXIT /b 1
116116
)
117117
) ELSE IF "%1%"=="build" (
118118
IF "%BE%"=="mingw-gcc" (

build/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3006001dev
1+
3006002

configure.ac

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ dnl First, define all of the version numbers up front.
44
dnl In particular, this allows the version macro to be used in AC_INIT
55

66
dnl These first two version numbers are updated automatically on each release.
7-
m4_define([LIBARCHIVE_VERSION_S],[3.6.1dev])
8-
m4_define([LIBARCHIVE_VERSION_N],[3006001])
7+
m4_define([LIBARCHIVE_VERSION_S],[3.6.2dev])
8+
m4_define([LIBARCHIVE_VERSION_N],[3006002])
99

1010
dnl bsdtar and bsdcpio versioning tracks libarchive
1111
m4_define([BSDTAR_VERSION_S],LIBARCHIVE_VERSION_S())
@@ -1209,24 +1209,7 @@ fi
12091209
if test "x$with_openssl" != "xno"; then
12101210
AC_CHECK_HEADERS([openssl/evp.h])
12111211
saved_LIBS=$LIBS
1212-
case "$host_os" in
1213-
*mingw* | *cygwin* | *msys*)
1214-
case "$host_cpu" in
1215-
x86_64)
1216-
AC_CHECK_LIB(eay64,OPENSSL_config)
1217-
if test "x$ac_cv_lib_eay64_main" != "xyes"; then
1218-
AC_CHECK_LIB(eay32,OPENSSL_config)
1219-
fi
1220-
;;
1221-
*)
1222-
AC_CHECK_LIB(eay32,OPENSSL_config)
1223-
;;
1224-
esac
1225-
;;
1226-
*)
1227-
AC_CHECK_LIB(crypto,OPENSSL_config)
1228-
;;
1229-
esac
1212+
AC_CHECK_LIB(crypto,OPENSSL_config)
12301213
CRYPTO_CHECK(MD5, OPENSSL, md5)
12311214
CRYPTO_CHECK(RMD160, OPENSSL, rmd160)
12321215
CRYPTO_CHECK(SHA1, OPENSSL, sha1)

libarchive/archive.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
* assert that ARCHIVE_VERSION_NUMBER >= 2012108.
3737
*/
3838
/* Note: Compiler will complain if this does not match archive_entry.h! */
39-
#define ARCHIVE_VERSION_NUMBER 3006001
39+
#define ARCHIVE_VERSION_NUMBER 3006002
4040

4141
#include <sys/stat.h>
4242
#include <stddef.h> /* for wchar_t */
@@ -155,7 +155,7 @@ __LA_DECL int archive_version_number(void);
155155
/*
156156
* Textual name/version of the library, useful for version displays.
157157
*/
158-
#define ARCHIVE_VERSION_ONLY_STRING "3.6.1dev"
158+
#define ARCHIVE_VERSION_ONLY_STRING "3.6.2dev"
159159
#define ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING
160160
__LA_DECL const char * archive_version_string(void);
161161

libarchive/archive_digest.c

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,8 @@ __archive_md5init(archive_md5_ctx *ctx)
243243
{
244244
if ((*ctx = EVP_MD_CTX_new()) == NULL)
245245
return (ARCHIVE_FAILED);
246-
EVP_DigestInit(*ctx, EVP_md5());
246+
if (!EVP_DigestInit(*ctx, EVP_md5()))
247+
return (ARCHIVE_FAILED);
247248
return (ARCHIVE_OK);
248249
}
249250

@@ -434,7 +435,8 @@ __archive_ripemd160init(archive_rmd160_ctx *ctx)
434435
{
435436
if ((*ctx = EVP_MD_CTX_new()) == NULL)
436437
return (ARCHIVE_FAILED);
437-
EVP_DigestInit(*ctx, EVP_ripemd160());
438+
if (!EVP_DigestInit(*ctx, EVP_ripemd160()))
439+
return (ARCHIVE_FAILED);
438440
return (ARCHIVE_OK);
439441
}
440442

@@ -624,7 +626,8 @@ __archive_sha1init(archive_sha1_ctx *ctx)
624626
{
625627
if ((*ctx = EVP_MD_CTX_new()) == NULL)
626628
return (ARCHIVE_FAILED);
627-
EVP_DigestInit(*ctx, EVP_sha1());
629+
if (!EVP_DigestInit(*ctx, EVP_sha1()))
630+
return (ARCHIVE_FAILED);
628631
return (ARCHIVE_OK);
629632
}
630633

@@ -887,7 +890,8 @@ __archive_sha256init(archive_sha256_ctx *ctx)
887890
{
888891
if ((*ctx = EVP_MD_CTX_new()) == NULL)
889892
return (ARCHIVE_FAILED);
890-
EVP_DigestInit(*ctx, EVP_sha256());
893+
if (!EVP_DigestInit(*ctx, EVP_sha256()))
894+
return (ARCHIVE_FAILED);
891895
return (ARCHIVE_OK);
892896
}
893897

@@ -1122,7 +1126,8 @@ __archive_sha384init(archive_sha384_ctx *ctx)
11221126
{
11231127
if ((*ctx = EVP_MD_CTX_new()) == NULL)
11241128
return (ARCHIVE_FAILED);
1125-
EVP_DigestInit(*ctx, EVP_sha384());
1129+
if (!EVP_DigestInit(*ctx, EVP_sha384()))
1130+
return (ARCHIVE_FAILED);
11261131
return (ARCHIVE_OK);
11271132
}
11281133

@@ -1381,7 +1386,8 @@ __archive_sha512init(archive_sha512_ctx *ctx)
13811386
{
13821387
if ((*ctx = EVP_MD_CTX_new()) == NULL)
13831388
return (ARCHIVE_FAILED);
1384-
EVP_DigestInit(*ctx, EVP_sha512());
1389+
if (!EVP_DigestInit(*ctx, EVP_sha512()))
1390+
return (ARCHIVE_FAILED);
13851391
return (ARCHIVE_OK);
13861392
}
13871393

libarchive/archive_entry.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#define ARCHIVE_ENTRY_H_INCLUDED
3131

3232
/* Note: Compiler will complain if this does not match archive.h! */
33-
#define ARCHIVE_VERSION_NUMBER 3006001
33+
#define ARCHIVE_VERSION_NUMBER 3006002
3434

3535
/*
3636
* Note: archive_entry.h is for use outside of libarchive; the

libarchive/archive_read_support_format_rar.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3328,6 +3328,7 @@ run_filters(struct archive_read *a)
33283328
struct rar *rar = (struct rar *)(a->format->data);
33293329
struct rar_filters *filters = &rar->filters;
33303330
struct rar_filter *filter = filters->stack;
3331+
struct rar_filter *f;
33313332
size_t start, end;
33323333
int64_t tend;
33333334
uint32_t lastfilteraddress;
@@ -3345,6 +3346,22 @@ run_filters(struct archive_read *a)
33453346
ret = expand(a, &tend);
33463347
if (ret != ARCHIVE_OK)
33473348
return 0;
3349+
3350+
/* Check if filter stack was modified in expand() */
3351+
ret = ARCHIVE_FATAL;
3352+
f = filters->stack;
3353+
while (f)
3354+
{
3355+
if (f == filter)
3356+
{
3357+
ret = ARCHIVE_OK;
3358+
break;
3359+
}
3360+
f = f->next;
3361+
}
3362+
if (ret != ARCHIVE_OK)
3363+
return 0;
3364+
33483365
if (tend < 0)
33493366
return 0;
33503367
end = (size_t)tend;

0 commit comments

Comments
 (0)