From: Andy Heninger Date: Wed, 1 Mar 2017 21:59:38 +0000 (+0000) Subject: ICU-13008 Signed int overflow (undefined behavior) in datefmt.cpp X-Git-Tag: release-59-rc~135 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=80606f5b57f1e0c89574e7ef0d463c30c6f18d90;p=icu ICU-13008 Signed int overflow (undefined behavior) in datefmt.cpp X-SVN-Rev: 39718 --- diff --git a/icu4c/source/i18n/datefmt.cpp b/icu4c/source/i18n/datefmt.cpp index 60681403af3..7dc753f1411 100644 --- a/icu4c/source/i18n/datefmt.cpp +++ b/icu4c/source/i18n/datefmt.cpp @@ -80,7 +80,7 @@ public: fSkeleton(other.fSkeleton) { } virtual ~DateFmtBestPatternKey(); virtual int32_t hashCode() const { - return 37 * LocaleCacheKey::hashCode() + fSkeleton.hashCode(); + return (int32_t)(37u * (uint32_t)LocaleCacheKey::hashCode() + (uint32_t)fSkeleton.hashCode()); } virtual UBool operator==(const CacheKeyBase &other) const { // reflexive