Commit 05feca6f authored by Paul Bakker's avatar Paul Bakker
Browse files

- Fixed incorrect handling of negative strings in mpi_read_string() (found by...

 - Fixed incorrect handling of negative strings in mpi_read_string() (found by code coverage tests).

parent 80ab9f5e
PolarSSL ChangeLog
= Version X released on X
Bug fixes
* Fixed incorrect handling of negative strings in
mpi_read_string() (found by code coverage tests).
= Version 0.11.1 released on 2009-05-17
* Fixed missing functionality for SHA-224, SHA-256, SHA384,
SHA-512 in rsa_pkcs1_sign()
......
......@@ -286,7 +286,15 @@ int mpi_read_string( mpi *X, int radix, char *s )
MPI_CHK( mpi_get_digit( &d, radix, s[i] ) );
MPI_CHK( mpi_mul_int( &T, X, radix ) );
MPI_CHK( mpi_add_int( X, &T, d ) );
if( X->s == 1 )
{
MPI_CHK( mpi_add_int( X, &T, d ) );
}
else
{
MPI_CHK( mpi_sub_int( X, &T, d ) );
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment