Replace memset with OPENSSL_cleanse()
authorMatt Caswell <matt@openssl.org>
Thu, 30 Apr 2015 13:04:30 +0000 (14:04 +0100)
committerMatt Caswell <matt@openssl.org>
Wed, 10 Jun 2015 09:24:30 +0000 (10:24 +0100)
commit23cd01ef61ff9110850ee75c42ccb365ddc8a6ab
tree225bf3eb7604a9b0ef6fd6920567e44e63a1cca1
parentdcad51bc13c9b716d9a66248bcc4038c071ff158
Replace memset with OPENSSL_cleanse()

BUF_MEM_free() attempts to cleanse memory using memset immediately prior
to a free. This is at risk of being optimised away by the compiler, so
replace with a call to OPENSSL_cleanse() instead.

With thanks to the Open Crypto Audit Project for reporting this issue.

Reviewed-by: Stephen Henson <steve@openssl.org>
crypto/buffer/buffer.c