commit | 246b1634ff6be81d956d7c7c60d7edb13e701f2d | [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> | Wed Jul 12 11:10:46 2017 +0100 |
tree | 03028b0cc8fe0084cce44bf634aa0ee7fe2faa41 | |
parent | 11d2db1701ed77484c1cef5dc8a612d8b32661af [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 ); }