diff options
author | Richard Levitte <levitte@openssl.org> | 2019-08-21 11:08:20 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-08-21 11:18:58 +0200 |
commit | d32d304836caaca475c21a82b94e494898cb60c5 (patch) | |
tree | 2d81a470ba2ae4cc7c01f812a380b3b7aa9fbcf9 /crypto | |
parent | 5fa7789f1b46c6851df4cf8dde403b7f08bf93ea (diff) |
Fix ossl_param_bld_push_{utf8,octet}_string() / param_bld_convert()
ossl_param_bld_push_{utf8,octet}_string() saved the constant string
pointer to a non-constant structure field, so we change that field to
a pointer to a constant. We also modify param_bld_convert() to
pretend the resulting pointer for PTR types points to a constant as
well.
Completes #9649
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/9651)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/param_build.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/param_build.c b/crypto/param_build.c index db2182196c..01866b01d9 100644 --- a/crypto/param_build.c +++ b/crypto/param_build.c @@ -260,7 +260,7 @@ static OSSL_PARAM *param_bld_convert(OSSL_PARAM_BLD *bld, OSSL_PARAM *param, } else if (pd->type == OSSL_PARAM_OCTET_PTR || pd->type == OSSL_PARAM_UTF8_PTR) { /* PTR */ - *(void **)p = pd->string; + *(const void **)p = pd->string; } else if (pd->type == OSSL_PARAM_OCTET_STRING || pd->type == OSSL_PARAM_UTF8_STRING) { if (pd->string != NULL) |