We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 81acfbf commit 5015ca4Copy full SHA for 5015ca4
src/lib/libcrypto/hmac/hm_pmeth.c
@@ -1,4 +1,4 @@
1
-/* $OpenBSD: hm_pmeth.c,v 1.11 2021/12/12 21:27:38 tb Exp $ */
+/* $OpenBSD: hm_pmeth.c,v 1.12 2022/03/30 07:12:30 tb Exp $ */
2
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3
* project 2007.
4
*/
@@ -80,13 +80,9 @@ pkey_hmac_init(EVP_PKEY_CTX *ctx)
80
{
81
HMAC_PKEY_CTX *hctx;
82
83
- hctx = malloc(sizeof(HMAC_PKEY_CTX));
84
- if (!hctx)
+ if ((hctx = calloc(1, sizeof(HMAC_PKEY_CTX))) == NULL)
85
return 0;
86
- hctx->md = NULL;
87
- hctx->ktmp.data = NULL;
88
- hctx->ktmp.length = 0;
89
- hctx->ktmp.flags = 0;
+
90
hctx->ktmp.type = V_ASN1_OCTET_STRING;
91
HMAC_CTX_init(&hctx->ctx);
92
0 commit comments