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

This commit is contained in:
obdev
2022-09-21 13:02:36 +00:00
committed by wangzelin.wzl
parent ef9d44a2e4
commit 053d54bc59

View File

@ -373,9 +373,8 @@ int ObNumber::from_sci_(const char* str, const int64_t length, IAllocator& alloc
}
}
if (cur <= '9' && cur >= '0') {
cur = str[++i];
while (i < length && cur <= '9' && cur >= '0') {
cur = str[++i];
while (cur <= '9' && cur >= '0' && (++i < length)) {
cur = str[i];
}
} else {
/* 0e */