From ae985635fe2aaaa72f05229b26b4382b705229cb Mon Sep 17 00:00:00 2001 From: obdev Date: Mon, 4 Jul 2022 10:15:31 +0800 Subject: [PATCH] [CP] Avoid out of boundery buffer accessing for obnumber logging --- deps/oblib/src/lib/number/ob_number_v2.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/deps/oblib/src/lib/number/ob_number_v2.cpp b/deps/oblib/src/lib/number/ob_number_v2.cpp index b4cedb415e..207e7d746a 100644 --- a/deps/oblib/src/lib/number/ob_number_v2.cpp +++ b/deps/oblib/src/lib/number/ob_number_v2.cpp @@ -499,7 +499,15 @@ int ObNumber::from_sci_(const char* str, const int64_t length, IAllocator& alloc } } 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) { cur = str[++i]; } -- GitLab