[BUG][stack-buffer-overflow] fix overflow while calculate hash code in ArrayType and fix some warning

This commit is contained in:
stdpain
2021-07-27 13:41:00 +08:00
committed by GitHub
parent cdffe1ae20
commit 776df2effc
6 changed files with 27 additions and 27 deletions

View File

@ -67,7 +67,7 @@ int64_t ParseUtil::parse_mem_spec(const std::string& mem_spec_str, bool* is_perc
}
StringParser::ParseResult result;
int64_t bytes;
int64_t bytes = -1;
if (multiplier != -1 || *is_percent) {
// Parse float - MB or GB or percent