diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2025-01-01 10:37:56 +0100 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2025-01-01 10:37:56 +0100 |
commit | 138e5e7c1dfba4717a4e6d5abb1abb0f82d6f49f (patch) | |
tree | fd6bc3d389d162a9f555a415e410e84cd7988492 /src/Common/libzip/zip_io_util.c | |
parent | fcc6302e6139b5b4714c91fd91d215c77af7695c (diff) | |
download | VeraCrypt-138e5e7c1dfba4717a4e6d5abb1abb0f82d6f49f.tar.gz VeraCrypt-138e5e7c1dfba4717a4e6d5abb1abb0f82d6f49f.zip |
Windows: Update libzip to version 1.11.2
Diffstat (limited to 'src/Common/libzip/zip_io_util.c')
-rw-r--r-- | src/Common/libzip/zip_io_util.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Common/libzip/zip_io_util.c b/src/Common/libzip/zip_io_util.c index 9fcd10b4..6ae8aac6 100644 --- a/src/Common/libzip/zip_io_util.c +++ b/src/Common/libzip/zip_io_util.c @@ -1,6 +1,6 @@ /* zip_io_util.c -- I/O helper functions - Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2024 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <info@libzip.org> @@ -69,8 +69,14 @@ _zip_read_data(zip_buffer_t *buffer, zip_source_t *src, size_t length, bool nulp return NULL; } +// VS2022: Workaround an Internal compiler error for Release ARM (32-bit) build. +#if _MSC_VER >= 1940 && _MSC_VER < 1950 && defined(_M_ARM) && defined(NDEBUG) + size_t l = length + (nulp ? 1 : 0); + r = (zip_uint8_t *)malloc(l); +#else r = (zip_uint8_t *)malloc(length + (nulp ? 1 : 0)); - if (!r) { +#endif + if (r == NULL) { zip_error_set(error, ZIP_ER_MEMORY, 0); return NULL; } |