diff options
author | robot-contrib <robot-contrib@yandex-team.com> | 2025-02-10 19:48:58 +0300 |
---|---|---|
committer | robot-contrib <robot-contrib@yandex-team.com> | 2025-02-10 21:06:58 +0300 |
commit | ef2c3edb41df54268c5bcc4c59e91404764d5af9 (patch) | |
tree | 323e3632bb3ed9a393c779a613285207fbeab833 /contrib | |
parent | 4b2c8aacf05f44a2ed5edf26890d2d0d1e8b7e0b (diff) | |
download | ydb-ef2c3edb41df54268c5bcc4c59e91404764d5af9.tar.gz |
Update contrib/libs/lzma to 5.6.4
commit_hash:509ecf098c2bdb4bf7273b95ff459ee74bd2a6bf
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/libs/lzma/.yandex_meta/override.nix | 4 | ||||
-rw-r--r-- | contrib/libs/lzma/NEWS | 49 | ||||
-rw-r--r-- | contrib/libs/lzma/THANKS | 5 | ||||
-rw-r--r-- | contrib/libs/lzma/common/sysdefs.h | 30 | ||||
-rw-r--r-- | contrib/libs/lzma/liblzma/api/lzma/lzma12.h | 2 | ||||
-rw-r--r-- | contrib/libs/lzma/liblzma/api/lzma/version.h | 2 | ||||
-rw-r--r-- | contrib/libs/lzma/liblzma/common/memcmplen.h | 9 | ||||
-rw-r--r-- | contrib/libs/lzma/liblzma/common/string_conversion.c | 4 | ||||
-rw-r--r-- | contrib/libs/lzma/liblzma/lzma/lzma_decoder.c | 2 | ||||
-rw-r--r-- | contrib/libs/lzma/ya.make | 4 |
10 files changed, 92 insertions, 19 deletions
diff --git a/contrib/libs/lzma/.yandex_meta/override.nix b/contrib/libs/lzma/.yandex_meta/override.nix index a0b15f6179..32dfe8f429 100644 --- a/contrib/libs/lzma/.yandex_meta/override.nix +++ b/contrib/libs/lzma/.yandex_meta/override.nix @@ -1,11 +1,11 @@ pkgs: attrs: with pkgs; with attrs; rec { - version = "5.6.3"; + version = "5.6.4"; src = fetchFromGitHub { owner = "tukaani-project"; repo = "xz"; rev = "v${version}"; - hash = "sha256-2bxTxgDGlA0zPlfFs69bkuBGL44Se1ktSZCJ1Pt75I0="; + hash = "sha256-Xp1uLtQIoOG/qVLpq5D/KFmTOJ0+mNkNclyuJsvlUbE="; }; nativeBuildInputs = [ autoreconfHook ]; diff --git a/contrib/libs/lzma/NEWS b/contrib/libs/lzma/NEWS index 478b24b26e..f260a332f7 100644 --- a/contrib/libs/lzma/NEWS +++ b/contrib/libs/lzma/NEWS @@ -2,10 +2,56 @@ XZ Utils Release Notes ====================== +5.6.4 (2025-01-23) + + * liblzma: Fix LZMA/LZMA2 encoder on big endian ARM64. + + * xz: + + - Fix --filters= and --filters1= ... --filters9= options + parsing. They require an argument, thus "xz --filters lzma2" + should work in addition to "xz --filters=lzma2". + + - On the man page, note in the --compress and --decompress + options that the default behavior is to delete the input + file unless writing to standard output. It was already + documented in the DESCRIPTION section but new users in + a hurry might miss it. + + * Windows (native builds, not Cygwin): Fix regressions introduced + in XZ Utils 5.6.3 which caused non-ASCII characters to display + incorrectly. Only builds with translation support were affected + (--enable-nls or ENABLE_NLS=ON). The following changes affect + builds that have translations enabled: + + - Require UCRT because MSVCRT doesn't support UTF-8 + locales and thus translations won't be readable on + Windows 10 version 1903 and later. (MSVCRT builds + are still possible with --disable-nls or ENABLE_NLS=OFF.) + + - Require gettext-runtime >= 0.23.1 because older versions + don't autodetect the use of the UTF-8 code page. This + resulted in garbled non-ASCII characters even with UCRT. + + - Partially fix alignment issues in xz --verbose --list + with translated messages. Chinese (simplified), + Chinese (traditional), and Korean column headings + are misaligned still because Windows and MinGW-w64 + don't provide wcwidth() and XZ Utils doesn't include + a replacement function either. + + * CMake: Explicitly disable unity builds. This prevents build + failures when another project uses XZ Utils via CMake's + FetchContent module, and that project enables unity builds. + + * Update Chinese (traditional) and Serbian translations. + + 5.6.3 (2024-10-01) IMPORTANT: This includes a Windows-specific security fix to - the command line tools. liblzma isn't affected by this issue. + the command line tools (CVE-2024-47611). liblzma isn't affected + by this issue. * liblzma: @@ -55,6 +101,7 @@ XZ Utils Release Notes which can be exploited with malicious filenames to do argument injection or directory traversal attacks. UTF-8 avoids best-fit mappings and thus fixes the issue. + (CVE-2024-47611) Forcing the process code page to UTF-8 is possible only on Windows 10 version 1903 and later. The command line diff --git a/contrib/libs/lzma/THANKS b/contrib/libs/lzma/THANKS index 5ed0743b50..3326e9712e 100644 --- a/contrib/libs/lzma/THANKS +++ b/contrib/libs/lzma/THANKS @@ -34,12 +34,14 @@ has been important. :-) In alphabetical order: - Vitaly Chikunov - Antoine Cœur - Felix Collin + - Marcus Comstedt - Gabi Davar - İhsan Doğan - Chris Donawa - Andrew Dudman - Markus Duft - İsmail Dönmez + - Dexter Castor Döpping - Paul Eggert - Robert Elz - Gilles Espinasse @@ -118,6 +120,7 @@ has been important. :-) In alphabetical order: - Alexander Neumann - Hongbo Ni - Jonathan Nieder + - Asgeir Storesund Nilsen - Andre Noll - Peter O'Gorman - Dimitri Papadopoulos Orfanos @@ -125,6 +128,7 @@ has been important. :-) In alphabetical order: - Filip Palian - Peter Pallinger - Kai Pastor + - Keith Patton - Rui Paulo - Igor Pavlov - Diego Elio Pettenò @@ -181,6 +185,7 @@ has been important. :-) In alphabetical order: - Christian Weisgerber - Dan Weiss - Bert Wesarg + - Mark Wielaard - Fredrik Wikstrom - Jim Wilcoxson - Ralf Wildenhues diff --git a/contrib/libs/lzma/common/sysdefs.h b/contrib/libs/lzma/common/sysdefs.h index 5f3785b513..1c2405dcd8 100644 --- a/contrib/libs/lzma/common/sysdefs.h +++ b/contrib/libs/lzma/common/sysdefs.h @@ -23,17 +23,29 @@ # include <config.h> #endif -// This #define ensures that C99 and POSIX compliant stdio functions are -// available with MinGW-w64 (both 32-bit and 64-bit). Modern MinGW-w64 adds -// this automatically, for example, when the compiler is in C99 (or later) -// mode when building against msvcrt.dll. It still doesn't hurt to be explicit -// that we always want this and #define this unconditionally. +// Choose if MinGW-w64's stdio replacement functions should be used. +// The default has varied slightly in the past so it's clearest to always +// set it explicitly. // -// With Universal CRT (UCRT) this is less important because UCRT contains -// C99-compatible stdio functions. It's still nice to #define this as UCRT -// doesn't support the POSIX thousand separator flag in printf (like "%'u"). -#ifdef __MINGW32__ +// Modern MinGW-w64 enables the replacement functions even with UCRT +// when _GNU_SOURCE is defined. That's good because UCRT doesn't support +// the POSIX thousand separator flag in printf (like "%'u"). Otherwise +// XZ Utils works with the UCRT stdio functions. +// +// The replacement functions add over 20 KiB to each executable. For +// size-optimized builds (HAVE_SMALL), disable the replacements. +// Then thousand separators aren't shown in xz's messages but this is +// a minor downside compare to the slower speed of the HAVE_SMALL builds. +// +// The legacy MSVCRT is pre-C99 and it's best to always use the stdio +// replacements functions from MinGW-w64. +#if defined(__MINGW32__) && !defined(__USE_MINGW_ANSI_STDIO) # define __USE_MINGW_ANSI_STDIO 1 +# include <_mingw.h> +# if defined(_UCRT) && defined(HAVE_SMALL) +# undef __USE_MINGW_ANSI_STDIO +# define __USE_MINGW_ANSI_STDIO 0 +# endif #endif // size_t and NULL diff --git a/contrib/libs/lzma/liblzma/api/lzma/lzma12.h b/contrib/libs/lzma/liblzma/api/lzma/lzma12.h index 05f5b66eb5..fec3e0dadb 100644 --- a/contrib/libs/lzma/liblzma/api/lzma/lzma12.h +++ b/contrib/libs/lzma/liblzma/api/lzma/lzma12.h @@ -461,7 +461,7 @@ typedef struct { * * ext_size_low holds the least significant 32 bits of the * uncompressed size. The most significant 32 bits must be set - * in ext_size_high. The macro lzma_ext_size_set(opt_lzma, u64size) + * in ext_size_high. The macro lzma_set_ext_size(opt_lzma, u64size) * can be used to set these members. * * The 64-bit uncompressed size is split into two uint32_t variables diff --git a/contrib/libs/lzma/liblzma/api/lzma/version.h b/contrib/libs/lzma/liblzma/api/lzma/version.h index e86c0ea4c3..86c8b199f5 100644 --- a/contrib/libs/lzma/liblzma/api/lzma/version.h +++ b/contrib/libs/lzma/liblzma/api/lzma/version.h @@ -22,7 +22,7 @@ #define LZMA_VERSION_MINOR 6 /** \brief Patch version number of the liblzma release. */ -#define LZMA_VERSION_PATCH 3 +#define LZMA_VERSION_PATCH 4 /** * \brief Version stability marker diff --git a/contrib/libs/lzma/liblzma/common/memcmplen.h b/contrib/libs/lzma/liblzma/common/memcmplen.h index 394a4856dd..86b5d6f37e 100644 --- a/contrib/libs/lzma/liblzma/common/memcmplen.h +++ b/contrib/libs/lzma/liblzma/common/memcmplen.h @@ -65,8 +65,7 @@ lzma_memcmplen(const uint8_t *buf1, const uint8_t *buf2, || (defined(_MSC_VER) && (defined(_M_X64) \ || defined(_M_ARM64) || defined(_M_ARM64EC)))) // This is only for x86-64 and ARM64 for now. This might be fine on - // other 64-bit processors too. On big endian one should use xor - // instead of subtraction and switch to __builtin_clzll(). + // other 64-bit processors too. // // Reasons to use subtraction instead of xor: // @@ -82,7 +81,11 @@ lzma_memcmplen(const uint8_t *buf1, const uint8_t *buf2, // version 2023-05-26. https://www.agner.org/optimize/ #define LZMA_MEMCMPLEN_EXTRA 8 while (len < limit) { +# ifdef WORDS_BIGENDIAN + const uint64_t x = read64ne(buf1 + len) ^ read64ne(buf2 + len); +# else const uint64_t x = read64ne(buf1 + len) - read64ne(buf2 + len); +# endif if (x != 0) { // MSVC or Intel C compiler on Windows # if defined(_MSC_VER) || defined(__INTEL_COMPILER) @@ -90,6 +93,8 @@ lzma_memcmplen(const uint8_t *buf1, const uint8_t *buf2, _BitScanForward64(&tmp, x); len += (uint32_t)tmp >> 3; // GCC, Clang, or Intel C compiler +# elif defined(WORDS_BIGENDIAN) + len += (uint32_t)__builtin_clzll(x) >> 3; # else len += (uint32_t)__builtin_ctzll(x) >> 3; # endif diff --git a/contrib/libs/lzma/liblzma/common/string_conversion.c b/contrib/libs/lzma/liblzma/common/string_conversion.c index c899783c64..3a08486a1f 100644 --- a/contrib/libs/lzma/liblzma/common/string_conversion.c +++ b/contrib/libs/lzma/liblzma/common/string_conversion.c @@ -317,6 +317,10 @@ parse_lzma12_preset(const char **const str, const char *str_end, uint32_t *preset) { assert(*str < str_end); + + if (!(**str >= '0' && **str <= '9')) + return "Unsupported preset"; + *preset = (uint32_t)(**str - '0'); // NOTE: Remember to update LZMA12_PRESET_STR if this is modified! diff --git a/contrib/libs/lzma/liblzma/lzma/lzma_decoder.c b/contrib/libs/lzma/liblzma/lzma/lzma_decoder.c index 0abed02b81..2088a2faa5 100644 --- a/contrib/libs/lzma/liblzma/lzma/lzma_decoder.c +++ b/contrib/libs/lzma/liblzma/lzma/lzma_decoder.c @@ -18,7 +18,7 @@ // The macros unroll loops with switch statements. // Silence warnings about missing fall-through comments. -#if TUKLIB_GNUC_REQ(7, 0) +#if TUKLIB_GNUC_REQ(7, 0) || defined(__clang__) # pragma GCC diagnostic ignored "-Wimplicit-fallthrough" #endif diff --git a/contrib/libs/lzma/ya.make b/contrib/libs/lzma/ya.make index 8d69e9753d..60d612bae1 100644 --- a/contrib/libs/lzma/ya.make +++ b/contrib/libs/lzma/ya.make @@ -11,9 +11,9 @@ LICENSE( LICENSE_TEXTS(.yandex_meta/licenses.list.txt) -VERSION(5.6.3) +VERSION(5.6.4) -ORIGINAL_SOURCE(https://github.com/tukaani-project/xz/archive/v5.6.3.tar.gz) +ORIGINAL_SOURCE(https://github.com/tukaani-project/xz/archive/v5.6.4.tar.gz) ADDINCL( GLOBAL contrib/libs/lzma/liblzma/api |