hx509: Fix ENOMEM free of garbage encoding PKCS#10

This commit is contained in:
Nicolas Williams
2023-01-03 20:41:13 -06:00
parent 1473b96d1c
commit 64254d64dd

View File

@@ -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)