From f096fe4b9803a7e037a33e4e1bd78f96b482017c Mon Sep 17 00:00:00 2001 From: Pauli Date: Mon, 27 May 2024 13:37:41 +1000 Subject: [PATCH] Resolve undefined behaviour in wpacket test There is no necessity for rand_data to be aligned so that it can be directly dereferenced as a uint64_t. Reviewed-by: Tim Hudson Reviewed-by: Shane Lontis (Merged from https://github.com/openssl/openssl/pull/24498) --- test/wpackettest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/wpackettest.c b/test/wpackettest.c index 8e5eb8d4cf4..bc688b96646 100644 --- a/test/wpackettest.c +++ b/test/wpackettest.c @@ -590,7 +590,7 @@ static int test_WPACKET_quic_vlint_random(void) if (!TEST_int_gt(RAND_bytes(rand_data, sizeof(rand_data)), 0)) return cleanup(&pkt); - memcpy(&expected, rand_data, sizeof(uint64_t)); + memcpy(&expected, rand_data, sizeof(expected)); /* * Ensure that all size classes get tested with equal probability. -- 2.47.2