mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 11:15:43 +01:00
Checks mbedtls_rsa_export return in fuzz targets
This commit is contained in:
parent
dbcb44202c
commit
66070bc19d
@ -29,7 +29,9 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||
mbedtls_mpi_init( &DQ ); mbedtls_mpi_init( &QP );
|
||||
|
||||
rsa = mbedtls_pk_rsa( pk );
|
||||
mbedtls_rsa_export( rsa, &N, &P, &Q, &D, &E );
|
||||
if ( mbedtls_rsa_export( rsa, &N, &P, &Q, &D, &E ) != 0 ) {
|
||||
abort();
|
||||
}
|
||||
mbedtls_rsa_export_crt( rsa, &DP, &DQ, &QP );
|
||||
|
||||
mbedtls_mpi_free( &N ); mbedtls_mpi_free( &P ); mbedtls_mpi_free( &Q );
|
||||
|
@ -20,7 +20,9 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||
mbedtls_mpi_init( &DQ ); mbedtls_mpi_init( &QP );
|
||||
|
||||
rsa = mbedtls_pk_rsa( pk );
|
||||
ret = mbedtls_rsa_export( rsa, &N, &P, &Q, &D, &E );
|
||||
if ( mbedtls_rsa_export( rsa, &N, &P, &Q, &D, &E ) != 0 ) {
|
||||
abort();
|
||||
}
|
||||
ret = mbedtls_rsa_export_crt( rsa, &DP, &DQ, &QP );
|
||||
|
||||
mbedtls_mpi_free( &N ); mbedtls_mpi_free( &P ); mbedtls_mpi_free( &Q );
|
||||
|
Loading…
Reference in New Issue
Block a user