diff options
author | Pauli <paul.dale@oracle.com> | 2019-04-08 14:28:59 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2019-04-08 14:28:59 +1000 |
commit | e9cfa192019574a75fbeca4811c10635a9049381 (patch) | |
tree | eb27d30ad2ead0dc6492a5e2c746415d0e40e85b | |
parent | f997e456b9bd43af275aab90c727a52287467e98 (diff) |
Avoid alignment problems in params API.
Using a byte buffer causes problems for device that don't handle unaligned
reads. Instead use the properly aligned variable that was already pointed at.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8696)
-rw-r--r-- | test/params_api_test.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/test/params_api_test.c b/test/params_api_test.c index 94487d613b..c78a42bade 100644 --- a/test/params_api_test.c +++ b/test/params_api_test.c @@ -146,7 +146,6 @@ static int test_param_int(int n) if (!TEST_mem_eq(cmp, len, raw_values[n].value, len)) return 0; in = 0; - param.data = buf; if (!TEST_true(OSSL_PARAM_get_int(¶m, &in))) return 0; le_copy(cmp, &in, sizeof(in)); @@ -174,7 +173,6 @@ static int test_param_long(int n) if (!TEST_mem_eq(cmp, len, raw_values[n].value, len)) return 0; in = 0; - param.data = buf; if (!TEST_true(OSSL_PARAM_get_long(¶m, &in))) return 0; le_copy(cmp, &in, sizeof(in)); @@ -201,7 +199,6 @@ static int test_param_uint(int n) if (!TEST_mem_eq(cmp, len, raw_values[n].value, len)) return 0; in = 0; - param.data = buf; if (!TEST_true(OSSL_PARAM_get_uint(¶m, &in))) return 0; le_copy(cmp, &in, sizeof(in)); @@ -229,7 +226,6 @@ static int test_param_ulong(int n) if (!TEST_mem_eq(cmp, len, raw_values[n].value, len)) return 0; in = 0; - param.data = buf; if (!TEST_true(OSSL_PARAM_get_ulong(¶m, &in))) return 0; le_copy(cmp, &in, sizeof(in)); @@ -257,7 +253,6 @@ static int test_param_int32(int n) if (!TEST_mem_eq(cmp, len, raw_values[n].value, len)) return 0; in = 0; - param.data = buf; if (!TEST_true(OSSL_PARAM_get_int32(¶m, &in))) return 0; le_copy(cmp, &in, sizeof(in)); @@ -285,7 +280,6 @@ static int test_param_uint32(int n) if (!TEST_mem_eq(cmp, len, raw_values[n].value, len)) return 0; in = 0; - param.data = buf; if (!TEST_true(OSSL_PARAM_get_uint32(¶m, &in))) return 0; le_copy(cmp, &in, sizeof(in)); @@ -313,7 +307,6 @@ static int test_param_int64(int n) if (!TEST_mem_eq(cmp, len, raw_values[n].value, len)) return 0; in = 0; - param.data = buf; if (!TEST_true(OSSL_PARAM_get_int64(¶m, &in))) return 0; le_copy(cmp, &in, sizeof(in)); @@ -341,7 +334,6 @@ static int test_param_uint64(int n) if (!TEST_mem_eq(cmp, len, raw_values[n].value, len)) return 0; in = 0; - param.data = buf; if (!TEST_true(OSSL_PARAM_get_uint64(¶m, &in))) return 0; le_copy(cmp, &in, sizeof(in)); @@ -369,7 +361,6 @@ static int test_param_size_t(int n) if (!TEST_mem_eq(cmp, len, raw_values[n].value, len)) return 0; in = 0; - param.data = buf; if (!TEST_true(OSSL_PARAM_get_size_t(¶m, &in))) return 0; le_copy(cmp, &in, sizeof(in)); |