diff --git a/library/pem.c b/library/pem.c index 611c788fd..789a92d51 100644 --- a/library/pem.c +++ b/library/pem.c @@ -333,6 +333,7 @@ int pem_read_buffer( pem_context *ctx, const char *header, const char *footer, if( ( ret = base64_decode( buf, &len, s1, s2 - s1 ) ) != 0 ) { + polarssl_zeroize( buf, len ); polarssl_free( buf ); return( POLARSSL_ERR_PEM_INVALID_DATA + ret ); }