diff options
Diffstat (limited to 'crypto/evp/bio_enc.c')
-rw-r--r-- | crypto/evp/bio_enc.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/crypto/evp/bio_enc.c b/crypto/evp/bio_enc.c index bf74a0ac72..2e6ce33e4e 100644 --- a/crypto/evp/bio_enc.c +++ b/crypto/evp/bio_enc.c @@ -112,17 +112,13 @@ static int enc_new(BIO *bi) { BIO_ENC_CTX *ctx; - ctx = OPENSSL_malloc(sizeof(*ctx)); + ctx = OPENSSL_zalloc(sizeof(*ctx)); if (ctx == NULL) return (0); - EVP_CIPHER_CTX_init(&ctx->cipher); - ctx->buf_len = 0; - ctx->buf_off = 0; + EVP_CIPHER_CTX_init(&ctx->cipher); ctx->cont = 1; - ctx->finished = 0; ctx->ok = 1; - bi->init = 0; bi->ptr = (char *)ctx; bi->flags = 0; |