Fix warnings (some bugs, some spurious)

Many spurious VC warnings not quieted though.
This commit is contained in:
Nicolas Williams
2020-03-12 00:42:33 -05:00
parent f3e6c4ffd4
commit 64d5f86ec3
20 changed files with 38 additions and 36 deletions

View File

@@ -636,7 +636,7 @@ hx509_request_to_pkcs10(hx509_context context,
if (ret == 0)
ret = get_exts(context, req, &exts);
if (ret == 0 && exts.len) {
Attribute *a;
Attribute *a = NULL; /* Quiet VC */
heim_any extns;
r.certificationRequestInfo.attributes =
@@ -655,7 +655,7 @@ hx509_request_to_pkcs10(hx509_context context,
if (ret == 0)
ASN1_MALLOC_ENCODE(Extensions, extns.data, extns.length,
&exts, &size, ret);
if (ret == 0)
if (ret == 0 && a)
ret = der_copy_oid(&asn1_oid_id_pkcs9_extReq, &a->type);
if (ret == 0)
ret = add_AttributeValues(&a->value, &extns);