From 94f95efce93555f65d3582558e39866e9f074ca2 Mon Sep 17 00:00:00 2001 From: Bernd Edlinger Date: Thu, 2 Jan 2025 16:17:46 +0100 Subject: Fix a potential misaligned memory access MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit in test/wpackettest.c:593:18: runtime error: load of misaligned address for type 'uint64_t', which requires 8 byte alignment. Reviewed-by: Saša Nedvědický Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/26269) --- test/wpackettest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/wpackettest.c') diff --git a/test/wpackettest.c b/test/wpackettest.c index 1284d7a0ce..8e5eb8d4cf 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); - expected = *(uint64_t*)rand_data; + memcpy(&expected, rand_data, sizeof(uint64_t)); /* * Ensure that all size classes get tested with equal probability. -- cgit v1.2.3