X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fevp%2Fevp_enc.c;h=7f55c4196b603143f9c8b7978174e06d65f4c28b;hb=4fe1cbdff89768c5d1983988ce1022674a438bbb;hp=4dfc1593e6a6e5d53651b5365011af48456e5d80;hpb=b4faea50c35d92a67d1369355b49cc3efba78406;p=oweals%2Fopenssl.git diff --git a/crypto/evp/evp_enc.c b/crypto/evp/evp_enc.c index 4dfc1593e6..7f55c4196b 100644 --- a/crypto/evp/evp_enc.c +++ b/crypto/evp/evp_enc.c @@ -57,7 +57,7 @@ */ #include -#include "cryptlib.h" +#include "internal/cryptlib.h" #include #include #include @@ -66,12 +66,9 @@ #endif #include "evp_locl.h" -const char EVP_version[] = "EVP" OPENSSL_VERSION_PTEXT; - void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *ctx) { - memset(ctx, 0, sizeof(EVP_CIPHER_CTX)); - /* ctx->cipher=NULL; */ + memset(ctx, 0, sizeof(*ctx)); } EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void) @@ -161,7 +158,7 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ctx->cipher = cipher; if (ctx->cipher->ctx_size) { - ctx->cipher_data = OPENSSL_malloc(ctx->cipher->ctx_size); + ctx->cipher_data = OPENSSL_zalloc(ctx->cipher->ctx_size); if (!ctx->cipher_data) { EVPerr(EVP_F_EVP_CIPHERINIT_EX, ERR_R_MALLOC_FAILURE); return 0; @@ -546,7 +543,7 @@ int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *c) */ ENGINE_finish(c->engine); #endif - memset(c, 0, sizeof(EVP_CIPHER_CTX)); + memset(c, 0, sizeof(*c)); return 1; }