Zeroize tmp buf in mbedtls_mpi_fill_random()

This commit is contained in:
Andres Amaya Garcia 2017-06-26 11:20:02 +01:00
parent e0a727ec4e
commit 64f0e09316

View file

@ -1877,6 +1877,8 @@ int mbedtls_mpi_fill_random( mbedtls_mpi *X, size_t size,
MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( X, buf, size ) );
cleanup:
mbedtls_zeroize( buf, sizeof( buf ) );
return( ret );
}