提交 053d54bc 编写于 作者: O obdev 提交者: wangzelin.wzl

[CP] Fix string to number access out of bound core

上级 ef9d44a2
...@@ -373,9 +373,8 @@ int ObNumber::from_sci_(const char* str, const int64_t length, IAllocator& alloc ...@@ -373,9 +373,8 @@ int ObNumber::from_sci_(const char* str, const int64_t length, IAllocator& alloc
} }
} }
if (cur <= '9' && cur >= '0') { if (cur <= '9' && cur >= '0') {
cur = str[++i]; while (cur <= '9' && cur >= '0' && (++i < length)) {
while (i < length && cur <= '9' && cur >= '0') { cur = str[i];
cur = str[++i];
} }
} else { } else {
/* 0e */ /* 0e */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册