From c0937c08e38370964a8bd0845d8d15306e2613d7 Mon Sep 17 00:00:00 2001 From: Michael Beale Date: Fri, 24 Oct 2025 11:41:04 -0700 Subject: [PATCH] Potential fix for code scanning alert no. 30: Multiplication result converted to larger type Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- src/pke/lib/keyswitch/keyswitch-hybrid.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pke/lib/keyswitch/keyswitch-hybrid.cpp b/src/pke/lib/keyswitch/keyswitch-hybrid.cpp index fb7cd35c8..1dc548244 100644 --- a/src/pke/lib/keyswitch/keyswitch-hybrid.cpp +++ b/src/pke/lib/keyswitch/keyswitch-hybrid.cpp @@ -352,7 +352,7 @@ std::shared_ptr> KeySwitchHYBRID::EvalKeySwitchPrecomputeC if (part == numPartQl - 1) { auto paramsPartQ = cryptoParams->GetParamsPartQ(part); - uint32_t sizePartQl = sizeQl - alpha * part; + uint32_t sizePartQl = sizeQl - static_cast(alpha) * part; std::vector moduli(sizePartQl); std::vector roots(sizePartQl);