mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 17:15:38 +01:00
- Fixed incorrect handling of negative strings in mpi_read_string() (found by code coverage tests).
This commit is contained in:
parent
80ab9f5eb5
commit
05feca6f7c
@ -1,5 +1,10 @@
|
||||
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,8 +286,16 @@ 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 ) );
|
||||
|
||||
if( X->s == 1 )
|
||||
{
|
||||
MPI_CHK( mpi_add_int( X, &T, d ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
MPI_CHK( mpi_sub_int( X, &T, d ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cleanup:
|
||||
|
Loading…
Reference in New Issue
Block a user