Skip to content

Commit 4671a79

Browse files
bernd-edlingerSashan
authored andcommitted
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ý <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from openssl#26269)
1 parent 6097255 commit 4671a79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/wpackettest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ static int test_WPACKET_quic_vlint_random(void)
590590
if (!TEST_int_gt(RAND_bytes(rand_data, sizeof(rand_data)), 0))
591591
return cleanup(&pkt);
592592

593-
expected = *(uint64_t*)rand_data;
593+
memcpy(&expected, rand_data, sizeof(uint64_t));
594594

595595
/*
596596
* Ensure that all size classes get tested with equal probability.

0 commit comments

Comments
 (0)