From 243b79544fb8525394c880d6f242ceb72ce1d9b0 Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Mon, 13 Jan 2025 20:14:14 +0100 Subject: [PATCH] Fix code scanning alert no. 13: Multiplication result converted to larger type (#2675) Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- src/lib/third_party/include/binaryfusefilter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/third_party/include/binaryfusefilter.h b/src/lib/third_party/include/binaryfusefilter.h index 1e93d67ef39..4209484bc3c 100644 --- a/src/lib/third_party/include/binaryfusefilter.h +++ b/src/lib/third_party/include/binaryfusefilter.h @@ -155,7 +155,7 @@ static inline binary_hashes_t binary_fuse8_hash_batch(uint64_t hash, static inline uint32_t binary_fuse8_hash(int index, uint64_t hash, const binary_fuse8_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