commit | e3e8edfa51332fa9f8831e4ba6d52caff061fe0b | [log] [tgz] |
---|---|---|
author | Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com> | Tue Dec 01 09:31:52 2015 +0100 |
committer | Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com> | Tue Dec 01 09:34:36 2015 +0100 |
tree | f3382161a2a7ab722a364b29d27579bd239e0d63 | |
parent | 15b15d1361a177d9aca54633177474dccd997470 [diff] [blame] |
Fix potential integer overflow in prev. commit Found by Clang's -Wshift-count-overflow
diff --git a/library/bignum.c b/library/bignum.c index b9279e8..76c958b 100644 --- a/library/bignum.c +++ b/library/bignum.c
@@ -362,7 +362,7 @@ static size_t mbedtls_clz( const mbedtls_mpi_uint x ) { 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++ ) {