mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-01 12:32:43 +00:00
[cipher.h] Arithmetic overflow in binary left shift operation (MBEDTLS_KEY_BITLEN_SHIFT)
Fixing arithmetic overflow warning (C6297), if compiled in Visual Studio Signed-off-by: BrianX7c <151365853+BrianX7c@users.noreply.github.com>
This commit is contained in:
parent
dc848955d6
commit
5c7ab6fe86
@ -480,7 +480,7 @@ static inline size_t mbedtls_cipher_info_get_key_bitlen(
|
||||
if (info == NULL) {
|
||||
return 0;
|
||||
} else {
|
||||
return info->MBEDTLS_PRIVATE(key_bitlen) << MBEDTLS_KEY_BITLEN_SHIFT;
|
||||
return ((size_t) info->MBEDTLS_PRIVATE(key_bitlen)) << MBEDTLS_KEY_BITLEN_SHIFT;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user