mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-25 16:55:43 +01:00
Added missing MPI_CHK() around some statements
This commit is contained in:
parent
5bc07a3d30
commit
6ea1a95ce8
@ -30,6 +30,8 @@ Bugfix
|
|||||||
* Potential memory leak in ssl_ticket_keys_init()
|
* Potential memory leak in ssl_ticket_keys_init()
|
||||||
* Memory leak in benchmark application
|
* Memory leak in benchmark application
|
||||||
* Fixed x509_crt_parse_path() bug on Windows platforms
|
* Fixed x509_crt_parse_path() bug on Windows platforms
|
||||||
|
* Added missing MPI_CHK() around some statements in mpi_div_mpi() (found by
|
||||||
|
TrustInSoft)
|
||||||
|
|
||||||
Security
|
Security
|
||||||
* Possible remotely-triggered out-of-bounds memory access fixed (found by
|
* Possible remotely-triggered out-of-bounds memory access fixed (found by
|
||||||
|
@ -1221,9 +1221,9 @@ int mpi_div_mpi( mpi *Q, mpi *R, const mpi *A, const mpi *B )
|
|||||||
while( mpi_cmp_mpi( &X, &Y ) >= 0 )
|
while( mpi_cmp_mpi( &X, &Y ) >= 0 )
|
||||||
{
|
{
|
||||||
Z.p[n - t]++;
|
Z.p[n - t]++;
|
||||||
mpi_sub_mpi( &X, &X, &Y );
|
MPI_CHK( mpi_sub_mpi( &X, &X, &Y ) );
|
||||||
}
|
}
|
||||||
mpi_shift_r( &Y, biL * (n - t) );
|
MPI_CHK( mpi_shift_r( &Y, biL * (n - t) ) );
|
||||||
|
|
||||||
for( i = n; i > t ; i-- )
|
for( i = n; i > t ; i-- )
|
||||||
{
|
{
|
||||||
@ -1316,15 +1316,15 @@ int mpi_div_mpi( mpi *Q, mpi *R, const mpi *A, const mpi *B )
|
|||||||
|
|
||||||
if( Q != NULL )
|
if( Q != NULL )
|
||||||
{
|
{
|
||||||
mpi_copy( Q, &Z );
|
MPI_CHK( mpi_copy( Q, &Z ) );
|
||||||
Q->s = A->s * B->s;
|
Q->s = A->s * B->s;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( R != NULL )
|
if( R != NULL )
|
||||||
{
|
{
|
||||||
mpi_shift_r( &X, k );
|
MPI_CHK( mpi_shift_r( &X, k ) );
|
||||||
X.s = A->s;
|
X.s = A->s;
|
||||||
mpi_copy( R, &X );
|
MPI_CHK( mpi_copy( R, &X ) );
|
||||||
|
|
||||||
if( mpi_cmp_int( R, 0 ) == 0 )
|
if( mpi_cmp_int( R, 0 ) == 0 )
|
||||||
R->s = 1;
|
R->s = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user