From b747eb399c556858e05de51b1bb3e875c834c8e0 Mon Sep 17 00:00:00 2001 From: Anton Kling Date: Fri, 28 Jun 2024 17:56:53 +0200 Subject: Bug fix: Fix undefined behavior of ipv4_t type. Turns out unions that include arrays and a integer can have UB due to endianess not being the same across systems. --- include/typedefs.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/typedefs.h b/include/typedefs.h index c10482c..e221978 100644 --- a/include/typedefs.h +++ b/include/typedefs.h @@ -13,7 +13,6 @@ typedef int32_t i32; typedef int64_t i64; typedef union { - u8 a[4]; u32 d; } ipv4_t; -- cgit v1.2.3