Skip to content

Commit

Permalink
Fix a potential misaligned memory access
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
bernd-edlinger authored and t8m committed Jan 6, 2025
1 parent 2f67a3d commit 94f95ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/wpackettest.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 94f95ef

Please sign in to comment.