Zeroize stack before returning from mpi_fill_random

This commit is contained in:
Hanno Becker 2017-10-18 12:41:30 +01:00
parent b3088b4b37
commit 0f49bbc1fc

View file

@ -1881,6 +1881,7 @@ 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 );
}