diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-09-25 20:21:45 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-09-25 20:21:45 +0100 |
commit | c719fdcee603a5a706a45d10cb598762d56a727d (patch) | |
tree | 620cbf137661399a3fb1eff92914204f9a970713 /dev-libs/icu/files | |
parent | cc4618c9ba3d974948ebf340b542d8cb01db2f55 (diff) |
gentoo resync : 25.09.2021
Diffstat (limited to 'dev-libs/icu/files')
-rw-r--r-- | dev-libs/icu/files/icu-69.1-fix-ub-units.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/dev-libs/icu/files/icu-69.1-fix-ub-units.patch b/dev-libs/icu/files/icu-69.1-fix-ub-units.patch new file mode 100644 index 000000000000..6847d5851557 --- /dev/null +++ b/dev-libs/icu/files/icu-69.1-fix-ub-units.patch @@ -0,0 +1,23 @@ +https://github.com/unicode-org/icu/pull/1715 +https://bugs.gentoo.org/788112 + +From 29f1188d191a7a75ac7ffa4bfa390f625da39c53 Mon Sep 17 00:00:00 2001 +From: Andreas Schwab <schwab@suse.de> +Date: Tue, 11 May 2021 19:04:24 +0200 +Subject: [PATCH] ICU-21613 Fix undefined behaviour in + ComplexUnitsConverter::applyRounder + +--- a/i18n/units_complexconverter.cpp ++++ b/i18n/units_complexconverter.cpp +@@ -237,6 +237,11 @@ void ComplexUnitsConverter::applyRounder(MaybeStackArray<int64_t, 5> &intValues, + } + quantity = decimalQuantity.toDouble(); + ++ if (uprv_isNaN(quantity) || uprv_isInfinite(quantity)) { ++ // Do nothing for non-finite values, since conversion to int64_t is undefined ++ return; ++ } ++ + int32_t lastIndex = unitsConverters_.length() - 1; + if (lastIndex == 0) { + // Only one element, no need to bubble up the carry |