diff options
-rw-r--r-- | src/lib/libcrypto/evp/evp_enc.c | 8 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/evp/evp_enc.c | 8 |
2 files changed, 4 insertions, 12 deletions
diff --git a/src/lib/libcrypto/evp/evp_enc.c b/src/lib/libcrypto/evp/evp_enc.c index d650d285df..5c3da7c476 100644 --- a/src/lib/libcrypto/evp/evp_enc.c +++ b/src/lib/libcrypto/evp/evp_enc.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: evp_enc.c,v 1.19 2014/06/12 15:49:29 deraadt Exp $ */ | 1 | /* $OpenBSD: evp_enc.c,v 1.20 2014/06/15 15:44:39 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -74,16 +74,12 @@ void | |||
74 | EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *ctx) | 74 | EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *ctx) |
75 | { | 75 | { |
76 | memset(ctx, 0, sizeof(EVP_CIPHER_CTX)); | 76 | memset(ctx, 0, sizeof(EVP_CIPHER_CTX)); |
77 | /* ctx->cipher=NULL; */ | ||
78 | } | 77 | } |
79 | 78 | ||
80 | EVP_CIPHER_CTX * | 79 | EVP_CIPHER_CTX * |
81 | EVP_CIPHER_CTX_new(void) | 80 | EVP_CIPHER_CTX_new(void) |
82 | { | 81 | { |
83 | EVP_CIPHER_CTX *ctx = malloc(sizeof *ctx); | 82 | return calloc(1, sizeof(EVP_CIPHER_CTX)); |
84 | if (ctx) | ||
85 | EVP_CIPHER_CTX_init(ctx); | ||
86 | return ctx; | ||
87 | } | 83 | } |
88 | 84 | ||
89 | int | 85 | int |
diff --git a/src/lib/libssl/src/crypto/evp/evp_enc.c b/src/lib/libssl/src/crypto/evp/evp_enc.c index d650d285df..5c3da7c476 100644 --- a/src/lib/libssl/src/crypto/evp/evp_enc.c +++ b/src/lib/libssl/src/crypto/evp/evp_enc.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: evp_enc.c,v 1.19 2014/06/12 15:49:29 deraadt Exp $ */ | 1 | /* $OpenBSD: evp_enc.c,v 1.20 2014/06/15 15:44:39 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -74,16 +74,12 @@ void | |||
74 | EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *ctx) | 74 | EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *ctx) |
75 | { | 75 | { |
76 | memset(ctx, 0, sizeof(EVP_CIPHER_CTX)); | 76 | memset(ctx, 0, sizeof(EVP_CIPHER_CTX)); |
77 | /* ctx->cipher=NULL; */ | ||
78 | } | 77 | } |
79 | 78 | ||
80 | EVP_CIPHER_CTX * | 79 | EVP_CIPHER_CTX * |
81 | EVP_CIPHER_CTX_new(void) | 80 | EVP_CIPHER_CTX_new(void) |
82 | { | 81 | { |
83 | EVP_CIPHER_CTX *ctx = malloc(sizeof *ctx); | 82 | return calloc(1, sizeof(EVP_CIPHER_CTX)); |
84 | if (ctx) | ||
85 | EVP_CIPHER_CTX_init(ctx); | ||
86 | return ctx; | ||
87 | } | 83 | } |
88 | 84 | ||
89 | int | 85 | int |