[CP] Avoid out of boundery buffer accessing for obnumber logging

This commit is contained in:
obdev
2022-07-04 10:15:31 +08:00
committed by wangzelin.wzl
parent c40f0fed2f
commit ae985635fe

View File

@ -499,7 +499,15 @@ int ObNumber::from_sci_(const char* str, const int64_t length, IAllocator& alloc
} }
} }
if (OB_SUCC(ret) || !is_oracle_mode()) { if (OB_SUCC(ret) || !is_oracle_mode()) {
LOG_DEBUG("Number from sci last ", K(cur), K(i), K(str + i), K(length), K(valid_len), K(ret), K(warning)); LOG_DEBUG("Number from sci last ",
K(cur),
K(i),
"str",
ObString(length, str),
K(length),
K(valid_len),
K(ret),
K(warning));
while (cur == ' ' && i < length - 1) { while (cur == ' ' && i < length - 1) {
cur = str[++i]; cur = str[++i];
} }