diff options
author | Richard Levitte <levitte@openssl.org> | 2019-04-09 08:31:09 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-04-09 14:10:23 +0200 |
commit | f55ed701a458e3b3840a5d8c8dd3019d7d71a26f (patch) | |
tree | 76387777913e2de73294de2cf747f200104cdca8 /test | |
parent | Fix crash in X509_STORE_CTX_get_by_subject (diff) | |
download | openssl-f55ed701a458e3b3840a5d8c8dd3019d7d71a26f.tar.xz openssl-f55ed701a458e3b3840a5d8c8dd3019d7d71a26f.zip |
Params API: {utf8,octet}_ptr need to know the data size
When the purpose is to pass parameters to a setter function, that
setter function needs to know the size of the data passed. This
remains true for the pointer data types as well.
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/8703)
Diffstat (limited to 'test')
-rw-r--r-- | test/params_api_test.c | 4 | ||||
-rw-r--r-- | test/params_test.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/test/params_api_test.c b/test/params_api_test.c index a3d2337745..df708da7e1 100644 --- a/test/params_api_test.c +++ b/test/params_api_test.c @@ -475,8 +475,8 @@ static int test_param_construct(void) &sz); params[n++] = OSSL_PARAM_construct_octet_string("octstr", buf, sizeof(buf), &sz); - params[n++] = OSSL_PARAM_construct_utf8_ptr("utf8ptr", &bufp, &sz); - params[n++] = OSSL_PARAM_construct_octet_ptr("octptr", &vp, &sz); + params[n++] = OSSL_PARAM_construct_utf8_ptr("utf8ptr", &bufp, 0, &sz); + params[n++] = OSSL_PARAM_construct_octet_ptr("octptr", &vp, 0, &sz); params[n] = OSSL_PARAM_construct_end(); /* Search failure */ diff --git a/test/params_test.c b/test/params_test.c index 8d456bbbde..a128d8cdda 100644 --- a/test/params_test.c +++ b/test/params_test.c @@ -400,7 +400,7 @@ static OSSL_PARAM *construct_api_params(void) params[n++] = OSSL_PARAM_construct_utf8_string("p5", app_p5, sizeof(app_p5), &app_p5_l); params[n++] = OSSL_PARAM_construct_utf8_ptr("p6", (char **)&app_p6, - &app_p6_l); + sizeof(app_p6), &app_p6_l); params[n++] = OSSL_PARAM_construct_octet_string("foo", &foo, sizeof(foo), &foo_l); params[n++] = OSSL_PARAM_construct_end(); |