Fix MSAN issue caused by incorrect date format.

This commit is contained in:
JackyWoo 2024-08-09 18:33:45 +08:00
parent 344000c89a
commit 3357275fa8

View File

@ -1432,7 +1432,7 @@ ReturnType readDateTimeTextFallback(time_t & datetime, ReadBuffer & buf, const D
s_pos[size] = 0;
if constexpr (throw_exception)
throw Exception(ErrorCodes::CANNOT_PARSE_DATETIME, "Cannot parse time component of DateTime {}", s);
throw Exception(ErrorCodes::CANNOT_PARSE_DATETIME, "Cannot parse time component of DateTime {}", String(s, date_broken_down_length + 1 + size));
else
return false;
}