mirror of
https://github.com/ARMmbed/mbedtls.git
synced 2025-06-27 07:37:05 +08:00
Merge pull request #8546 from BrianX7c/development
[cipher.h] Arithmetic overflow in binary left shift operation
This commit is contained in:
commit
2e342f6938
@ -480,7 +480,7 @@ static inline size_t mbedtls_cipher_info_get_key_bitlen(
|
|||||||
if (info == NULL) {
|
if (info == NULL) {
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} 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