summaryrefslogtreecommitdiffstats
path: root/test/exdatatest.c
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2017-03-20 17:29:28 +0100
committerBernd Edlinger <bernd.edlinger@hotmail.de>2020-05-23 15:31:14 +0200
commit712e8debb5b2238450b303acb5f24298382c63a5 (patch)
treefbcbc73a1b34465cee2c4ab6199c3ae2a1ad9384 /test/exdatatest.c
parent2de64666a07cccf8477e6483de62ae31f463df64 (diff)
Fix the parameter types of the CRYPTO_EX_dup function type.
This fixes a strict aliasing issue in ui_dup_method_data. The parameter type of CRYPTO_EX_dup's from_d parameter is in fact void **, since it points to a pointer. This function is rarely used, therefore fix the param type although that may be considered an API breaking change. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2986)
Diffstat (limited to 'test/exdatatest.c')
-rw-r--r--test/exdatatest.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/exdatatest.c b/test/exdatatest.c
index 3ce6d33c1c..2e92c328fd 100644
--- a/test/exdatatest.c
+++ b/test/exdatatest.c
@@ -37,7 +37,7 @@ static void exnew(void *parent, void *ptr, CRYPTO_EX_DATA *ad,
}
static int exdup(CRYPTO_EX_DATA *to, const CRYPTO_EX_DATA *from,
- void *from_d, int idx, long argl, void *argp)
+ void **from_d, int idx, long argl, void *argp)
{
if (!TEST_int_eq(idx, saved_idx)
|| !TEST_long_eq(argl, saved_argl)
@@ -87,7 +87,7 @@ static void exnew2(void *parent, void *ptr, CRYPTO_EX_DATA *ad,
}
static int exdup2(CRYPTO_EX_DATA *to, const CRYPTO_EX_DATA *from,
- void *from_d, int idx, long argl, void *argp)
+ void **from_d, int idx, long argl, void *argp)
{
MYOBJ_EX_DATA **update_ex_data = (MYOBJ_EX_DATA**)from_d;
MYOBJ_EX_DATA *ex_data = NULL;