diff options
author | Luca Deri <lucaderi@users.noreply.github.com> | 2025-01-13 20:14:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-13 20:14:00 +0100 |
commit | 082a9ad3c3d5b50c60c7077f246e7c4675f09f9b (patch) | |
tree | 0e5317a5f9e3dd5e48106be8f05fab05a8710b66 | |
parent | 6b686be9d3cf9c30cb09a02a17eab45e03e7b8e4 (diff) |
Fix code scanning alert no. 12: Multiplication result converted to larger type (#2676)
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
-rw-r--r-- | src/lib/third_party/include/binaryfusefilter.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/third_party/include/binaryfusefilter.h b/src/lib/third_party/include/binaryfusefilter.h index 8326eb034..1e93d67ef 100644 --- a/src/lib/third_party/include/binaryfusefilter.h +++ b/src/lib/third_party/include/binaryfusefilter.h @@ -475,7 +475,7 @@ static inline binary_hashes_t binary_fuse16_hash_batch(uint64_t hash, static inline uint32_t binary_fuse16_hash(int index, uint64_t hash, const binary_fuse16_t *filter) { uint64_t h = binary_fuse_mulhi(hash, filter->SegmentCountLength); - h += index * filter->SegmentLength; + h += (uint64_t)index * filter->SegmentLength; // keep the lower 36 bits uint64_t hh = hash & ((1ULL << 36) - 1); // index 0: right shift by 36; index 1: right shift by 18; index 2: no shift |