Merge pull request #10798 from ClickHouse/fix-date-lut-msan-ubsan

Fix UBSan and MSan report in DateLUT
This commit is contained in:
alexey-milovidov 2020-05-11 08:28:08 +03:00 committed by GitHub
commit a2f220fd1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -135,7 +135,7 @@ DateLUTImpl::DateLUTImpl(const std::string & time_zone_)
/// Fill excessive part of lookup table. This is needed only to simplify handling of overflow cases. /// Fill excessive part of lookup table. This is needed only to simplify handling of overflow cases.
while (i < DATE_LUT_SIZE) while (i < DATE_LUT_SIZE)
{ {
lut[i] = lut[DATE_LUT_MAX_DAY_NUM]; lut[i] = lut[i - 1];
++i; ++i;
} }