From 8a748e1868a84f67b4db85cc35e74c042bc61d1c Mon Sep 17 00:00:00 2001 From: Erik Boasson Date: Sat, 6 Jun 2020 13:14:17 +0200 Subject: [PATCH] Fix incorrect cast of size_t* to uint32_t* CID 304509 - it does not affect behaviour because the called function uses it as an out parameter and the result is never inspected. Signed-off-by: Erik Boasson --- .../src/decode_serialized_payload_utests.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/security/builtin_plugins/tests/decode_serialized_payload/src/decode_serialized_payload_utests.c b/src/security/builtin_plugins/tests/decode_serialized_payload/src/decode_serialized_payload_utests.c index 85a3c2d..a1f5275 100644 --- a/src/security/builtin_plugins/tests/decode_serialized_payload/src/decode_serialized_payload_utests.c +++ b/src/security/builtin_plugins/tests/decode_serialized_payload/src/decode_serialized_payload_utests.c @@ -405,7 +405,7 @@ static void suite_decode_serialized_payload_fini(void) deallocate_shared_secret(); } -static bool split_encoded_data(unsigned char *data, size_t size, struct crypto_header **header, unsigned char **contents, uint32_t *length, struct crypto_footer **footer) +static bool split_encoded_data(unsigned char *data, size_t size, struct crypto_header **header, unsigned char **contents, size_t *length, struct crypto_footer **footer) { unsigned char *ptr; @@ -845,7 +845,7 @@ CU_Test(ddssec_builtin_decode_serialized_payload, invalid_data, .init = suite_de reset_exception(&exception); - result = split_encoded_data(encoded_buffer._buffer, encoded_buffer._length, &header, &contents, (uint32_t *) &length, &footer); + result = split_encoded_data(encoded_buffer._buffer, encoded_buffer._length, &header, &contents, &length, &footer); CU_ASSERT_FATAL(result); assert(result); // for Clang's static analyzer