diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2024-08-12 00:13:03 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2024-11-24 22:58:36 -0600 |
commit | e1878907c2988d142464c88e8ca2d8e366192fe2 (patch) | |
tree | ab1e02fc2be08706be34f7a3eecff10d371609ba /system/icu/islamic-calendar.patch | |
parent | 8992ea752a52e1afac4ea39e5db47c1c398e60e1 (diff) | |
download | packages-e1878907c2988d142464c88e8ca2d8e366192fe2.tar.gz packages-e1878907c2988d142464c88e8ca2d8e366192fe2.tar.bz2 packages-e1878907c2988d142464c88e8ca2d8e366192fe2.tar.xz packages-e1878907c2988d142464c88e8ca2d8e366192fe2.zip |
system/icu: Correct Islamic calendar calculations
Upstream commit d43d216feb left an extra addition when refactoring
overflow-checking maths, which caused some dates to be an erroneous year
in the future from where they should have been.
Diffstat (limited to 'system/icu/islamic-calendar.patch')
-rw-r--r-- | system/icu/islamic-calendar.patch | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/system/icu/islamic-calendar.patch b/system/icu/islamic-calendar.patch new file mode 100644 index 000000000..bae9734af --- /dev/null +++ b/system/icu/islamic-calendar.patch @@ -0,0 +1,14 @@ +The addition is duplicated, causing some dates to be one year off. + +Fixes: d43d216feb ("ICU-22633 Test and fix int32_t overflow for Calendar set") + +--- source/i18n/islamcal.cpp.old 2024-04-16 16:08:53.000000000 -0500 ++++ source/i18n/islamcal.cpp 2024-08-12 00:03:20.102380147 -0500 +@@ -452,7 +452,6 @@ + // This may be called by Calendar::handleComputeJulianDay with months out of the range + // 0..11. Need to handle that here since monthStart requires months in the range 0.11. + if (month > 11) { +- eyear += (month / 12); + if (uprv_add32_overflow(eyear, (month / 12), &eyear)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; |