1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

Fixed segfault in mpi_shift_r()

Fixed memory leak in test_suite_mpi
Amended ChangeLog
This commit is contained in:
Manuel Pégourié-Gonnard
2012-11-17 12:42:51 +01:00
committed by Paul Bakker
parent 25338d74ac
commit e44ec108be
4 changed files with 18 additions and 1 deletions

View File

@ -611,6 +611,9 @@ int mpi_shift_r( mpi *X, size_t count )
v0 = count / biL;
v1 = count & (biL - 1);
if( v0 > X->n || ( v0 == X->n && v1 > 0 ) )
return mpi_lset( X, 0 );
/*
* shift by count / limb_size
*/