mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-02-02 14:11:12 +00:00
Fix potential integer overflow in prev. commit
Found by Clang's -Wshift-count-overflow
This commit is contained in:
parent
ea303e3ece
commit
3eab29adc8
|
@ -362,7 +362,7 @@ size_t mbedtls_mpi_lsb( const mbedtls_mpi *X )
|
||||||
static size_t mbedtls_clz( const mbedtls_mpi_uint x )
|
static size_t mbedtls_clz( const mbedtls_mpi_uint x )
|
||||||
{
|
{
|
||||||
size_t j;
|
size_t j;
|
||||||
mbedtls_mpi_uint mask = 1 << (biL - 1);
|
mbedtls_mpi_uint mask = (mbedtls_mpi_uint) 1 << (biL - 1);
|
||||||
|
|
||||||
for( j = 0; j < biL; j++ )
|
for( j = 0; j < biL; j++ )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue