[fix](reader)replace an auto with size_t to avoid integer overflow (#10163)
This commit is contained in:
@ -291,7 +291,7 @@ Status BinaryDictPageDecoder::next_batch(size_t* n, ColumnBlockView* dst) {
|
||||
}
|
||||
|
||||
// use SIMD instruction to speed up call function `RoundUpToPowerOfTwo`
|
||||
auto mem_size = 0;
|
||||
size_t mem_size = 0;
|
||||
for (int i = 0; i < len; ++i) {
|
||||
mem_len[i] = BitUtil::RoundUpToPowerOf2Int32(mem_len[i], MemPool::DEFAULT_ALIGNMENT);
|
||||
mem_size += mem_len[i];
|
||||
|
||||
@ -208,7 +208,7 @@ public:
|
||||
}
|
||||
|
||||
// use SIMD instruction to speed up call function `RoundUpToPowerOfTwo`
|
||||
auto mem_size = 0;
|
||||
size_t mem_size = 0;
|
||||
for (int i = 0; i < max_fetch; ++i) {
|
||||
mem_len[i] = BitUtil::RoundUpToPowerOf2Int32(mem_len[i], MemPool::DEFAULT_ALIGNMENT);
|
||||
mem_size += mem_len[i];
|
||||
|
||||
Reference in New Issue
Block a user