From b610afe7715f387260803ab41c57173ed20545f0 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Wed, 24 Mar 2021 22:40:45 +0300 Subject: [PATCH] Another fix --- base/common/DateLUTImpl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/common/DateLUTImpl.h b/base/common/DateLUTImpl.h index 1a44c670650..8d393465b82 100644 --- a/base/common/DateLUTImpl.h +++ b/base/common/DateLUTImpl.h @@ -1069,11 +1069,11 @@ public: } template - inline LUTIndex addMonthsIndex(DateOrTime v, Int64 delta) const + inline LUTIndex NO_SANITIZE_UNDEFINED addMonthsIndex(DateOrTime v, Int64 delta) const { const Values & values = lut[toLUTIndex(v)]; - Int64 month = values.month + static_cast(delta); /// Cast is to avoid UB in signed integer overflow. + Int64 month = values.month + delta; if (month > 0) {