aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2020-01-03 09:16:14 -0500
committerJack Lloyd <[email protected]>2020-01-03 09:16:14 -0500
commit891afd9085412b0c0576c1e5fd28d75798ef1ab2 (patch)
treef6930b9d084ed1cac04cea23b4e3fac5328e943e /src/lib/pubkey
parent3567c921c102448fabc8c2643a1cb6acdb6f9e5c (diff)
Fix a Coverity issue
False positive since the values don't get large enough to overflow.
Diffstat (limited to 'src/lib/pubkey')
-rw-r--r--src/lib/pubkey/mce/mceliece_key.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/pubkey/mce/mceliece_key.cpp b/src/lib/pubkey/mce/mceliece_key.cpp
index bd386a0f9..6b44b4a73 100644
--- a/src/lib/pubkey/mce/mceliece_key.cpp
+++ b/src/lib/pubkey/mce/mceliece_key.cpp
@@ -32,7 +32,7 @@ McEliece_PrivateKey::McEliece_PrivateKey(polyn_gf2m const& goppa_polyn,
m_sqrtmod(square_root_matrix),
m_Linv(inverse_support),
m_coeffs(parity_check_matrix_coeffs),
- m_codimension(ceil_log2(inverse_support.size()) * goppa_polyn.get_degree()),
+ m_codimension(static_cast<size_t>(ceil_log2(inverse_support.size())) * goppa_polyn.get_degree()),
m_dimension(inverse_support.size() - m_codimension)
{
}