diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/ameth_lib.c')
-rw-r--r-- | src/lib/libcrypto/asn1/ameth_lib.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lib/libcrypto/asn1/ameth_lib.c b/src/lib/libcrypto/asn1/ameth_lib.c index 63ff18edae..8652e938bd 100644 --- a/src/lib/libcrypto/asn1/ameth_lib.c +++ b/src/lib/libcrypto/asn1/ameth_lib.c | |||
@@ -287,12 +287,10 @@ EVP_PKEY_asn1_new(int id, int flags, const char *pem_str, const char *info) | |||
287 | { | 287 | { |
288 | EVP_PKEY_ASN1_METHOD *ameth; | 288 | EVP_PKEY_ASN1_METHOD *ameth; |
289 | 289 | ||
290 | ameth = malloc(sizeof(EVP_PKEY_ASN1_METHOD)); | 290 | ameth = calloc(1, sizeof(EVP_PKEY_ASN1_METHOD)); |
291 | if (!ameth) | 291 | if (!ameth) |
292 | return NULL; | 292 | return NULL; |
293 | 293 | ||
294 | memset(ameth, 0, sizeof(EVP_PKEY_ASN1_METHOD)); | ||
295 | |||
296 | ameth->pkey_id = id; | 294 | ameth->pkey_id = id; |
297 | ameth->pkey_base_id = id; | 295 | ameth->pkey_base_id = id; |
298 | ameth->pkey_flags = flags | ASN1_PKEY_DYNAMIC; | 296 | ameth->pkey_flags = flags | ASN1_PKEY_DYNAMIC; |