commit | 3eab29adc8850a3e46feaa9def714c3f2160d38c | [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> | Thu Dec 03 19:09:21 2015 +0100 |
tree | 105984f3a2ba1eaf56c118e6b07201da4adf1e25 | |
parent | ea303e3ece21316d4e508952264fe631e6624225 [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++ ) {