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:
committed by
Paul Bakker
parent
25338d74ac
commit
e44ec108be
@ -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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user