diff options
author | Pauli <paul.dale@oracle.com> | 2020-06-15 10:07:50 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2020-06-23 21:44:47 +1000 |
commit | e3d6dc59fb3689f92d890a20fb5e1e5588dc95b8 (patch) | |
tree | ac461de3a91f5ebb3460358da8e10f59b038cb41 | |
parent | f9e504e8b1d4da4b8c9c16ee4c11e9815a800422 (diff) |
property: correctly set the has optional flag when merging property lists
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/12123)
-rw-r--r-- | crypto/property/property_parse.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/property/property_parse.c b/crypto/property/property_parse.c index 21f78c02e2..41a5a059c5 100644 --- a/crypto/property/property_parse.c +++ b/crypto/property/property_parse.c @@ -568,6 +568,7 @@ OSSL_PROPERTY_LIST *ossl_property_merge(const OSSL_PROPERTY_LIST *a, if (r == NULL) return NULL; + r->has_optional = 0; for (i = j = n = 0; i < a->n || j < b->n; n++) { if (i >= a->n) { copy = &bp[j++]; @@ -581,6 +582,7 @@ OSSL_PROPERTY_LIST *ossl_property_merge(const OSSL_PROPERTY_LIST *a, copy = &bp[j++]; } memcpy(r->properties + n, copy, sizeof(r->properties[0])); + r->has_optional |= copy->optional; } r->n = n; if (n != t) |