[CP] Fix string to number access out of bound core
This commit is contained in:
5
deps/oblib/src/lib/number/ob_number_v2.cpp
vendored
5
deps/oblib/src/lib/number/ob_number_v2.cpp
vendored
@ -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 */
|
||||
|
Reference in New Issue
Block a user