summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2025-01-02 16:17:46 +0100
committerTomas Mraz <tomas@openssl.org>2025-01-06 20:46:08 +0100
commit94f95efce93555f65d3582558e39866e9f074ca2 (patch)
tree2ea2e47a3990386d1af4cbef422ad0822ff62dfd
parentFix the sporadic test failure in 30-test_evp_extra.t (diff)
downloadopenssl-94f95efce93555f65d3582558e39866e9f074ca2.tar.xz
openssl-94f95efce93555f65d3582558e39866e9f074ca2.zip
Fix a potential misaligned memory access
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ý <sashan@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/26269)
-rw-r--r--test/wpackettest.c2
1 files changed, 1 insertions, 1 deletions
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.