diff options
Diffstat (limited to 'src/lib/libcrypto')
| -rw-r--r-- | src/lib/libcrypto/asn1/tasn_prn.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/lib/libcrypto/asn1/tasn_prn.c b/src/lib/libcrypto/asn1/tasn_prn.c index 4c676d8c04..54ec56ec25 100644 --- a/src/lib/libcrypto/asn1/tasn_prn.c +++ b/src/lib/libcrypto/asn1/tasn_prn.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: tasn_prn.c,v 1.21 2020/03/24 10:46:38 inoguchi Exp $ */ | 1 | /* $OpenBSD: tasn_prn.c,v 1.22 2021/12/03 17:10:49 jsing Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 2000. | 3 | * project 2000. |
| 4 | */ | 4 | */ |
| @@ -84,18 +84,14 @@ ASN1_PCTX default_pctx = { | |||
| 84 | ASN1_PCTX * | 84 | ASN1_PCTX * |
| 85 | ASN1_PCTX_new(void) | 85 | ASN1_PCTX_new(void) |
| 86 | { | 86 | { |
| 87 | ASN1_PCTX *ret; | 87 | ASN1_PCTX *p; |
| 88 | ret = malloc(sizeof(ASN1_PCTX)); | 88 | |
| 89 | if (ret == NULL) { | 89 | if ((p = calloc(1, sizeof(ASN1_PCTX))) == NULL) { |
| 90 | ASN1error(ERR_R_MALLOC_FAILURE); | 90 | ASN1error(ERR_R_MALLOC_FAILURE); |
| 91 | return NULL; | 91 | return NULL; |
| 92 | } | 92 | } |
| 93 | ret->flags = 0; | 93 | |
| 94 | ret->nm_flags = 0; | 94 | return p; |
| 95 | ret->cert_flags = 0; | ||
| 96 | ret->oid_flags = 0; | ||
| 97 | ret->str_flags = 0; | ||
| 98 | return ret; | ||
| 99 | } | 95 | } |
| 100 | 96 | ||
| 101 | void | 97 | void |
