aboutsummaryrefslogtreecommitdiffstats
path: root/libarchive
diff options
context:
space:
mode:
Diffstat (limited to 'libarchive')
-rw-r--r--libarchive/archive.h4
-rw-r--r--libarchive/archive_acl.c6
-rw-r--r--libarchive/archive_cryptor.c7
-rw-r--r--libarchive/archive_entry.h2
-rw-r--r--libarchive/archive_read_support_format_ar.c1
-rw-r--r--libarchive/archive_read_support_format_zip.c5
-rw-r--r--libarchive/test/test_sparse_basic.c2
7 files changed, 24 insertions, 3 deletions
diff --git a/libarchive/archive.h b/libarchive/archive.h
index cdbbeddf1d3c..cd65cd284b62 100644
--- a/libarchive/archive.h
+++ b/libarchive/archive.h
@@ -36,7 +36,7 @@
* assert that ARCHIVE_VERSION_NUMBER >= 2012108.
*/
/* Note: Compiler will complain if this does not match archive_entry.h! */
-#define ARCHIVE_VERSION_NUMBER 3003003
+#define ARCHIVE_VERSION_NUMBER 3003004
#include <sys/stat.h>
#include <stddef.h> /* for wchar_t */
@@ -155,7 +155,7 @@ __LA_DECL int archive_version_number(void);
/*
* Textual name/version of the library, useful for version displays.
*/
-#define ARCHIVE_VERSION_ONLY_STRING "3.3.3"
+#define ARCHIVE_VERSION_ONLY_STRING "3.3.4dev"
#define ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING
__LA_DECL const char * archive_version_string(void);
diff --git a/libarchive/archive_acl.c b/libarchive/archive_acl.c
index 4736531afa1d..9941d2f6fdb2 100644
--- a/libarchive/archive_acl.c
+++ b/libarchive/archive_acl.c
@@ -2058,6 +2058,12 @@ next_field(const char **p, const char **start,
}
*sep = **p;
+ /* If the field is only whitespace, bail out now. */
+ if (**p == '\0') {
+ *end = *p;
+ return;
+ }
+
/* Trim trailing whitespace to locate end of field. */
*end = *p - 1;
while (**end == ' ' || **end == '\t' || **end == '\n') {
diff --git a/libarchive/archive_cryptor.c b/libarchive/archive_cryptor.c
index 71967c9d46f0..74df5c405b08 100644
--- a/libarchive/archive_cryptor.c
+++ b/libarchive/archive_cryptor.c
@@ -316,7 +316,14 @@ aes_ctr_init(archive_crypto_ctx *ctx, const uint8_t *key, size_t key_len)
memcpy(ctx->key, key, key_len);
memset(ctx->nonce, 0, sizeof(ctx->nonce));
ctx->encr_pos = AES_BLOCK_SIZE;
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+ if (!EVP_CIPHER_CTX_reset(ctx->ctx)) {
+ EVP_CIPHER_CTX_free(ctx->ctx);
+ ctx->ctx = NULL;
+ }
+#else
EVP_CIPHER_CTX_init(ctx->ctx);
+#endif
return 0;
}
diff --git a/libarchive/archive_entry.h b/libarchive/archive_entry.h
index 78a060c242de..47653f37e5a0 100644
--- a/libarchive/archive_entry.h
+++ b/libarchive/archive_entry.h
@@ -30,7 +30,7 @@
#define ARCHIVE_ENTRY_H_INCLUDED
/* Note: Compiler will complain if this does not match archive.h! */
-#define ARCHIVE_VERSION_NUMBER 3003003
+#define ARCHIVE_VERSION_NUMBER 3003004
/*
* Note: archive_entry.h is for use outside of libarchive; the
diff --git a/libarchive/archive_read_support_format_ar.c b/libarchive/archive_read_support_format_ar.c
index b6b9fc3c6dcd..1b0205cc7058 100644
--- a/libarchive/archive_read_support_format_ar.c
+++ b/libarchive/archive_read_support_format_ar.c
@@ -459,6 +459,7 @@ ar_parse_common_header(struct ar *ar, struct archive_entry *entry,
uint64_t n;
/* Copy remaining header */
+ archive_entry_set_filetype(entry, AE_IFREG);
archive_entry_set_mtime(entry,
(time_t)ar_atol10(h + AR_date_offset, AR_date_size), 0L);
archive_entry_set_uid(entry,
diff --git a/libarchive/archive_read_support_format_zip.c b/libarchive/archive_read_support_format_zip.c
index 18f0d04e5c4e..420004dbabbc 100644
--- a/libarchive/archive_read_support_format_zip.c
+++ b/libarchive/archive_read_support_format_zip.c
@@ -2708,6 +2708,11 @@ slurp_central_directory(struct archive_read *a, struct zip *zip)
return ARCHIVE_FATAL;
zip_entry = calloc(1, sizeof(struct zip_entry));
+ if (zip_entry == NULL) {
+ archive_set_error(&a->archive, ENOMEM,
+ "Can't allocate zip entry");
+ return ARCHIVE_FATAL;
+ }
zip_entry->next = zip->zip_entries;
zip_entry->flags |= LA_FROM_CENTRAL_DIRECTORY;
zip->zip_entries = zip_entry;
diff --git a/libarchive/test/test_sparse_basic.c b/libarchive/test/test_sparse_basic.c
index 58d53a94e072..0df0f1d321ac 100644
--- a/libarchive/test/test_sparse_basic.c
+++ b/libarchive/test/test_sparse_basic.c
@@ -422,6 +422,7 @@ verify_sparse_file(struct archive *a, const char *path,
assert(sparse->type == END);
assertEqualInt(expected_offset, archive_entry_size(ae));
+ failure(path);
assertEqualInt(holes_seen, expected_holes);
assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
@@ -457,6 +458,7 @@ verify_sparse_file2(struct archive *a, const char *path,
/* Verify the number of holes only, not its offset nor its
* length because those alignments are deeply dependence on
* its filesystem. */
+ failure(path);
assertEqualInt(blocks, archive_entry_sparse_count(ae));
archive_entry_free(ae);
}