mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-21 23:05:55 +03:00
- Added extra check to prevent crash on failed memory allocation
This commit is contained in:
parent
0be82f20a9
commit
c110d025c2
@ -1087,7 +1087,7 @@ int mpi_div_mpi( mpi *Q, mpi *R, const mpi *A, const mpi *B )
|
|||||||
|
|
||||||
n = X.n - 1;
|
n = X.n - 1;
|
||||||
t = Y.n - 1;
|
t = Y.n - 1;
|
||||||
mpi_shift_l( &Y, biL * (n - t) );
|
MPI_CHK( mpi_shift_l( &Y, biL * (n - t) ) );
|
||||||
|
|
||||||
while( mpi_cmp_mpi( &X, &Y ) >= 0 )
|
while( mpi_cmp_mpi( &X, &Y ) >= 0 )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user