From 64254d64dd3269fac54b5f9793bbd56745a3861d Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Tue, 3 Jan 2023 20:41:13 -0600 Subject: [PATCH] hx509: Fix ENOMEM free of garbage encoding PKCS#10 --- lib/hx509/req.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/hx509/req.c b/lib/hx509/req.c index 208d71f20..d0bfe91a9 100644 --- a/lib/hx509/req.c +++ b/lib/hx509/req.c @@ -669,6 +669,8 @@ hx509_request_to_pkcs10(hx509_context context, Attribute *a = NULL; /* Quiet VC */ heim_any extns; + extns.data = NULL; + extns.length = 0; r.certificationRequestInfo.attributes = calloc(1, sizeof(r.certificationRequestInfo.attributes[0])); if (r.certificationRequestInfo.attributes == NULL)