diff --git a/library/bignum.c b/library/bignum.c index 886429206..25fe8beeb 100644 --- a/library/bignum.c +++ b/library/bignum.c @@ -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 ); }