Fix unchecked return in bignum
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
parent
218da3fcf9
commit
7725a63c24
2 changed files with 3 additions and 2 deletions
2
ChangeLog.d/fix_bignum_unchecked_return.txt
Normal file
2
ChangeLog.d/fix_bignum_unchecked_return.txt
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
Bugfix
|
||||||
|
* Fix unchecked return in bignum module.
|
|
@ -1666,8 +1666,7 @@ int mbedtls_mpi_mul_int( mbedtls_mpi *X, const mbedtls_mpi *A, mbedtls_mpi_uint
|
||||||
* calculating the result is trivial in those cases. */
|
* calculating the result is trivial in those cases. */
|
||||||
if( b == 0 || n == 0 )
|
if( b == 0 || n == 0 )
|
||||||
{
|
{
|
||||||
mbedtls_mpi_lset( X, 0 );
|
return mbedtls_mpi_lset( X, 0 );
|
||||||
return( 0 );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Calculate A*b as A + A*(b-1) to take advantage of mpi_mul_hlp */
|
/* Calculate A*b as A + A*(b-1) to take advantage of mpi_mul_hlp */
|
||||||
|
|
Loading…
Reference in a new issue