- Fixed incorrect handling of one single negative input value in mpi_add_abs() (found by code coverage tests).
This commit is contained in:
parent
05feca6f7c
commit
f7ca7b99dd
@ -4,6 +4,8 @@ PolarSSL ChangeLog
|
|||||||
Bug fixes
|
Bug fixes
|
||||||
* Fixed incorrect handling of negative strings in
|
* Fixed incorrect handling of negative strings in
|
||||||
mpi_read_string() (found by code coverage tests).
|
mpi_read_string() (found by code coverage tests).
|
||||||
|
* Fixed incorrect handling of one single negative input
|
||||||
|
value in mpi_add_abs() (found by code coverage tests).
|
||||||
|
|
||||||
= Version 0.11.1 released on 2009-05-17
|
= Version 0.11.1 released on 2009-05-17
|
||||||
* Fixed missing functionality for SHA-224, SHA-256, SHA384,
|
* Fixed missing functionality for SHA-224, SHA-256, SHA384,
|
||||||
|
@ -683,6 +683,11 @@ int mpi_add_abs( mpi *X, mpi *A, mpi *B )
|
|||||||
|
|
||||||
if( X != A )
|
if( X != A )
|
||||||
MPI_CHK( mpi_copy( X, A ) );
|
MPI_CHK( mpi_copy( X, A ) );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* X should always be positive as a result of unsigned additions.
|
||||||
|
*/
|
||||||
|
X->s = 1;
|
||||||
|
|
||||||
for( j = B->n - 1; j >= 0; j-- )
|
for( j = B->n - 1; j >= 0; j-- )
|
||||||
if( B->p[j] != 0 )
|
if( B->p[j] != 0 )
|
||||||
|
Loading…
Reference in New Issue
Block a user