summaryrefslogtreecommitdiff
path: root/crypto/property/property_parse.c
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2022-06-07 14:16:30 +0200
committerTomas Mraz <tomas@openssl.org>2022-06-10 14:06:57 +0200
commitf91568eb50e847d0db2441fd9b9c5ffc8c4fe934 (patch)
tree2ffe41b0cb91cbacefae9c985ff67a7d56c0c6e7 /crypto/property/property_parse.c
parentcec1699f1f54ba8b87f055776dc77b48dd37d5fa (diff)
downloadopenssl-new-f91568eb50e847d0db2441fd9b9c5ffc8c4fe934.tar.gz
parse_unquoted: Check returned value from ossl_property_value()
Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18494)
Diffstat (limited to 'crypto/property/property_parse.c')
-rw-r--r--crypto/property/property_parse.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/crypto/property/property_parse.c b/crypto/property/property_parse.c
index 1a78c5a436..cdfe477735 100644
--- a/crypto/property/property_parse.c
+++ b/crypto/property/property_parse.c
@@ -213,11 +213,10 @@ static int parse_unquoted(OSSL_LIB_CTX *ctx, const char *t[],
return 0;
}
v[i] = 0;
- if (err) {
+ if (err)
ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
- } else {
- res->v.str_val = ossl_property_value(ctx, v, create);
- }
+ else if ((res->v.str_val = ossl_property_value(ctx, v, create)) == 0)
+ err = 1;
*t = skip_space(s);
res->type = OSSL_PROPERTY_TYPE_STRING;
return !err;