Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
uncia: update to v2.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
fcharlie committed Apr 10, 2022
1 parent d550470 commit 17cfff5
Show file tree
Hide file tree
Showing 37 changed files with 11,072 additions and 1,195 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ endif()

set(UNCIA_VERSION_MAJOR 2)
set(UNCIA_VERSION_MINOR 0)
set(UNCIA_VERSION_PATCH 2)
set(UNCIA_VERSION_PATCH 3)
set(PACKAGE_VERSION "${UNCIA_VERSION_MAJOR}.${UNCIA_VERSION_MINOR}.${UNCIA_VERSION_PATCH}")

string(TOLOWER "${CMAKE_C_COMPILER_ARCHITECTURE_ID}" UNCIA_ARCH_NAME)
Expand Down
4 changes: 2 additions & 2 deletions lib/libarchive.lock
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#https://github.com/libarchive/libarchive/tree/1271f775dc917798ad7d03c3b3bd66bacad03603
3.6.0
#https://github.com/libarchive/libarchive/tree/8694ac9984cefefaf7c4c8a14ba6e74fb7f24c17
3.6.2
4 changes: 2 additions & 2 deletions lib/libarchive/archive.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 3006001
#define ARCHIVE_VERSION_NUMBER 3006002

#include <sys/stat.h>
#include <stddef.h> /* for wchar_t */
Expand Down Expand Up @@ -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.6.1dev"
#define ARCHIVE_VERSION_ONLY_STRING "3.6.2dev"
#define ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING
__LA_DECL const char * archive_version_string(void);

Expand Down
18 changes: 12 additions & 6 deletions lib/libarchive/archive_digest.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,8 @@ __archive_md5init(archive_md5_ctx *ctx)
{
if ((*ctx = EVP_MD_CTX_new()) == NULL)
return (ARCHIVE_FAILED);
EVP_DigestInit(*ctx, EVP_md5());
if (!EVP_DigestInit(*ctx, EVP_md5()))
return (ARCHIVE_FAILED);
return (ARCHIVE_OK);
}

Expand Down Expand Up @@ -434,7 +435,8 @@ __archive_ripemd160init(archive_rmd160_ctx *ctx)
{
if ((*ctx = EVP_MD_CTX_new()) == NULL)
return (ARCHIVE_FAILED);
EVP_DigestInit(*ctx, EVP_ripemd160());
if (!EVP_DigestInit(*ctx, EVP_ripemd160()))
return (ARCHIVE_FAILED);
return (ARCHIVE_OK);
}

Expand Down Expand Up @@ -624,7 +626,8 @@ __archive_sha1init(archive_sha1_ctx *ctx)
{
if ((*ctx = EVP_MD_CTX_new()) == NULL)
return (ARCHIVE_FAILED);
EVP_DigestInit(*ctx, EVP_sha1());
if (!EVP_DigestInit(*ctx, EVP_sha1()))
return (ARCHIVE_FAILED);
return (ARCHIVE_OK);
}

Expand Down Expand Up @@ -887,7 +890,8 @@ __archive_sha256init(archive_sha256_ctx *ctx)
{
if ((*ctx = EVP_MD_CTX_new()) == NULL)
return (ARCHIVE_FAILED);
EVP_DigestInit(*ctx, EVP_sha256());
if (!EVP_DigestInit(*ctx, EVP_sha256()))
return (ARCHIVE_FAILED);
return (ARCHIVE_OK);
}

Expand Down Expand Up @@ -1122,7 +1126,8 @@ __archive_sha384init(archive_sha384_ctx *ctx)
{
if ((*ctx = EVP_MD_CTX_new()) == NULL)
return (ARCHIVE_FAILED);
EVP_DigestInit(*ctx, EVP_sha384());
if (!EVP_DigestInit(*ctx, EVP_sha384()))
return (ARCHIVE_FAILED);
return (ARCHIVE_OK);
}

Expand Down Expand Up @@ -1381,7 +1386,8 @@ __archive_sha512init(archive_sha512_ctx *ctx)
{
if ((*ctx = EVP_MD_CTX_new()) == NULL)
return (ARCHIVE_FAILED);
EVP_DigestInit(*ctx, EVP_sha512());
if (!EVP_DigestInit(*ctx, EVP_sha512()))
return (ARCHIVE_FAILED);
return (ARCHIVE_OK);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/libarchive/archive_entry.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#define ARCHIVE_ENTRY_H_INCLUDED

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

/*
* Note: archive_entry.h is for use outside of libarchive; the
Expand Down
7 changes: 6 additions & 1 deletion lib/libarchive/archive_read_disk_posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ __FBSDID("$FreeBSD$");
#define O_CLOEXEC 0
#endif

#if defined(__hpux) && !defined(HAVE_DIRFD)
#define dirfd(x) ((x)->__dd_fd)
#define HAVE_DIRFD
#endif

/*-
* This is a new directory-walking system that addresses a number
* of problems I've had with fts(3). In particular, it has no
Expand Down Expand Up @@ -2428,7 +2433,7 @@ tree_dir_next_posix(struct tree *t)
#else /* HAVE_FDOPENDIR */
if (tree_enter_working_dir(t) == 0) {
t->d = opendir(".");
#if HAVE_DIRFD || defined(dirfd)
#ifdef HAVE_DIRFD
__archive_ensure_cloexec_flag(dirfd(t->d));
#endif
}
Expand Down
3 changes: 2 additions & 1 deletion lib/libarchive/archive_read_support_format_iso9660.c
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,8 @@ read_children(struct archive_read *a, struct file_info *parent)
p = b;
b += iso9660->logical_block_size;
step -= iso9660->logical_block_size;
for (; *p != 0 && p < b && p + *p <= b; p += *p) {
for (; *p != 0 && p + DR_name_offset < b && p + *p <= b;
p += *p) {
struct file_info *child;

/* N.B.: these special directory identifiers
Expand Down
5 changes: 1 addition & 4 deletions lib/libarchive/archive_read_support_format_mtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ detect_form(struct archive_read *a, int *is_form_d)
{
const char *p;
ssize_t avail, ravail;
ssize_t detected_bytes = 0, len, nl;
ssize_t len, nl;
int entry_cnt = 0, multiline = 0;
int form_D = 0;/* The archive is generated by `NetBSD mtree -D'
* (In this source we call it `form D') . */
Expand Down Expand Up @@ -728,8 +728,6 @@ detect_form(struct archive_read *a, int *is_form_d)
* character of previous line was '\' character. */
if (bid_keyword_list(p, len, 0, 0) <= 0)
break;
if (multiline == 1)
detected_bytes += len;
if (p[len-nl-1] != '\\') {
if (multiline == 1 &&
++entry_cnt >= MAX_BID_ENTRY)
Expand All @@ -745,7 +743,6 @@ detect_form(struct archive_read *a, int *is_form_d)

keywords = bid_entry(p, len, nl, &last_is_path);
if (keywords >= 0) {
detected_bytes += len;
if (form_D == 0) {
if (last_is_path)
form_D = 1;
Expand Down
17 changes: 17 additions & 0 deletions lib/libarchive/archive_read_support_format_rar.c
Original file line number Diff line number Diff line change
Expand Up @@ -3328,6 +3328,7 @@ run_filters(struct archive_read *a)
struct rar *rar = (struct rar *)(a->format->data);
struct rar_filters *filters = &rar->filters;
struct rar_filter *filter = filters->stack;
struct rar_filter *f;
size_t start, end;
int64_t tend;
uint32_t lastfilteraddress;
Expand All @@ -3345,6 +3346,22 @@ run_filters(struct archive_read *a)
ret = expand(a, &tend);
if (ret != ARCHIVE_OK)
return 0;

/* Check if filter stack was modified in expand() */
ret = ARCHIVE_FATAL;
f = filters->stack;
while (f)
{
if (f == filter)
{
ret = ARCHIVE_OK;
break;
}
f = f->next;
}
if (ret != ARCHIVE_OK)
return 0;

if (tend < 0)
return 0;
end = (size_t)tend;
Expand Down
2 changes: 1 addition & 1 deletion lib/libarchive/archive_read_support_format_zip.c
Original file line number Diff line number Diff line change
Expand Up @@ -1667,7 +1667,7 @@ zipx_lzma_alone_init(struct archive_read *a, struct zip *zip)
*/

/* Read magic1,magic2,lzma_params from the ZIPX stream. */
if((p = __archive_read_ahead(a, 9, NULL)) == NULL) {
if(zip->entry_bytes_remaining < 9 || (p = __archive_read_ahead(a, 9, NULL)) == NULL) {
archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
"Truncated lzma data");
return (ARCHIVE_FATAL);
Expand Down
10 changes: 5 additions & 5 deletions lib/zlib-intel/deflate_medium.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ struct match {
uInt orgstart;
};

#define MAX_DIST2 ((1 << MAX_WBITS) - MIN_LOOKAHEAD)

static int tr_tally_dist(deflate_state *s, int distance, int length)
{
return _tr_tally(s, distance, length);
Expand Down Expand Up @@ -113,6 +111,7 @@ static void fizzle_matches(deflate_state *s, struct match *current, struct match
unsigned char *match, *orig;
int changed = 0;
struct match c,n;
uInt maxDist;
/* step zero: sanity checks */

if (current->match_length <= 1)
Expand Down Expand Up @@ -142,7 +141,8 @@ static void fizzle_matches(deflate_state *s, struct match *current, struct match
n = *next;

/* step one: try to move the "next" match to the left as much as possible */
limit = next->strstart > MAX_DIST2 ? next->strstart - MAX_DIST2 : 0;
maxDist = MAX_DIST(s);
limit = next->strstart > maxDist ? next->strstart - maxDist : 0;

match = s->window + n.match_start - 1;
orig = s->window + n.strstart - 1;
Expand Down Expand Up @@ -230,7 +230,7 @@ block_state deflate_medium(deflate_state *s, int flush)
* At this point we have always match_length < MIN_MATCH
*/

if (hash_head != 0 && s->strstart - hash_head <= MAX_DIST2) {
if (hash_head != 0 && s->strstart - hash_head <= MAX_DIST(s)) {
/* To simplify the code, we prevent matches with the string
* of window index 0 (in particular we have to avoid a match
* of the string with itself at the start of the input file).
Expand Down Expand Up @@ -265,7 +265,7 @@ block_state deflate_medium(deflate_state *s, int flush)
/* Find the longest match, discarding those <= prev_length.
* At this point we have always match_length < MIN_MATCH
*/
if (hash_head != 0 && s->strstart - hash_head <= MAX_DIST2) {
if (hash_head != 0 && s->strstart - hash_head <= MAX_DIST(s)) {
/* To simplify the code, we prevent matches with the string
* of window index 0 (in particular we have to avoid a match
* of the string with itself at the start of the input file).
Expand Down
2 changes: 1 addition & 1 deletion lib/zlib-intel/inflate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1540,7 +1540,7 @@ z_streamp source;
struct inflate_state FAR *state;
struct inflate_state FAR *copy;
unsigned char FAR *window;
unsigned wsize;
unsigned wsize = 0;

/* check input */
if (inflateStateCheck(source) || dest == Z_NULL)
Expand Down
Loading

0 comments on commit 17cfff5

Please sign in to comment.