Wipe stack buffers in block_cipher_df

This is a partial backport of
1b36499062 (only for the buffer wiping).
Other wiping calls were previously added as backports of
"CTR_DRBG: clean stack
buffers" (d9aa84dc0d). This completes
the backporting of stack buffer wiping from the development branch.
This commit is contained in:
Gilles Peskine 2018-11-27 16:37:23 +01:00
parent 73e34facb4
commit 43c19648db

View File

@ -226,6 +226,10 @@ static int block_cipher_df( unsigned char *output,
mbedtls_aes_free( &aes_ctx );
mbedtls_zeroize( buf, sizeof( buf ) );
mbedtls_zeroize( tmp, sizeof( tmp ) );
mbedtls_zeroize( key, sizeof( key ) );
mbedtls_zeroize( chain, sizeof( chain ) );
return( 0 );
}