From c381444c7f033cbc5968069ed28795ac6933c091 Mon Sep 17 00:00:00 2001 From: Andres Amaya Garcia Date: Wed, 12 Jul 2017 10:44:50 +0100 Subject: [PATCH] Zeroize tmp buf in mbedtls_mpi_fill_random() --- library/bignum.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/bignum.c b/library/bignum.c index 4829d916b..e4a8dece5 100644 --- a/library/bignum.c +++ b/library/bignum.c @@ -1880,6 +1880,8 @@ int mpi_fill_random( mpi *X, size_t size, MPI_CHK( mpi_read_binary( X, buf, size ) ); cleanup: + polarssl_zeroize( buf, sizeof( buf ) ); + return( ret ); }