commit | 92d46f02460afa9765b5ca37a4de786b796adb78 | [log] [tgz] |
---|---|---|
author | Andres Amaya Garcia <andres.amayagarcia@arm.com> | Fri Jul 07 10:46:51 2017 +0100 |
committer | Andres Amaya Garcia <andres.amayagarcia@arm.com> | Fri Jul 07 10:46:51 2017 +0100 |
tree | 08104108f10bd8a14b8e09256713d6b389ac195a | |
parent | d48ba2b336b03a15aa905a0b9a45c8541fbe237f [diff] [blame] |
Zeroize buf if mbedtls_base64_decode() fails
diff --git a/library/pem.c b/library/pem.c index a09257c..ea36df8 100644 --- a/library/pem.c +++ b/library/pem.c
@@ -331,6 +331,7 @@ if( ( ret = mbedtls_base64_decode( buf, len, &len, s1, s2 - s1 ) ) != 0 ) { + mbedtls_zeroize( buf, len ); mbedtls_free( buf ); return( MBEDTLS_ERR_PEM_INVALID_DATA + ret ); }