mirror of
https://github.com/QuasarApp/openssl.git
synced 2025-05-10 16:39:40 +00:00
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)
This commit is contained in:
parent
5fa7789f1b
commit
d32d304836
@ -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
|
} else if (pd->type == OSSL_PARAM_OCTET_PTR
|
||||||
|| pd->type == OSSL_PARAM_UTF8_PTR) {
|
|| pd->type == OSSL_PARAM_UTF8_PTR) {
|
||||||
/* PTR */
|
/* PTR */
|
||||||
*(void **)p = pd->string;
|
*(const void **)p = pd->string;
|
||||||
} else if (pd->type == OSSL_PARAM_OCTET_STRING
|
} else if (pd->type == OSSL_PARAM_OCTET_STRING
|
||||||
|| pd->type == OSSL_PARAM_UTF8_STRING) {
|
|| pd->type == OSSL_PARAM_UTF8_STRING) {
|
||||||
if (pd->string != NULL)
|
if (pd->string != NULL)
|
||||||
|
@ -20,7 +20,7 @@ typedef struct {
|
|||||||
size_t size;
|
size_t size;
|
||||||
size_t alloc_blocks;
|
size_t alloc_blocks;
|
||||||
const BIGNUM *bn;
|
const BIGNUM *bn;
|
||||||
void *string;
|
const void *string;
|
||||||
union {
|
union {
|
||||||
/*
|
/*
|
||||||
* These fields are never directly addressed, but their sizes are
|
* These fields are never directly addressed, but their sizes are
|
||||||
|
Loading…
x
Reference in New Issue
Block a user