RT3841: memset() cipher_data when allocated
authorRich Salz <rsalz@akamai.com>
Fri, 8 May 2015 16:23:56 +0000 (12:23 -0400)
committerRich Salz <rsalz@openssl.org>
Wed, 13 May 2015 17:05:07 +0000 (13:05 -0400)
commit580139bd5b46c856b4c613fac6c27b011ec2e949
treef266748e990f1b3371b414c694a9bf044bfbfdf2
parentc490a5512e988559a830c15b8efb1d0376f2e282
RT3841: memset() cipher_data when allocated

If an EVP implementation (such as an engine) fails out early, it's
possible to call EVP_CIPHER_CTX_cleanup() which will call
ctx->cipher->cleanup() before the cipher_data has been initialized
via ctx->cipher->init().  Guarantee it's all-bytes-zero as soon as
it is allocated.

Reviewed-by: Matt Caswell <matt@openssl.org>
crypto/evp/evp_enc.c