From 32ec0a2f34a530271a1e5ccf9c64436bd18cd420 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Sat, 21 Feb 2026 12:13:58 +0100 Subject: lib: Fix invalid malloc pointer type The static analyzer complained about the struct in6_addr malloc being converted to uint8_t *. Fixed by casting IN6_LEN to a size_t numeric value instead of the direct sizeof. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/lib/protobuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/protobuf.c b/src/lib/protobuf.c index 6c80cfc2..d419a9f1 100644 --- a/src/lib/protobuf.c +++ b/src/lib/protobuf.c @@ -550,7 +550,7 @@ struct udp4_config udp4_config_msg_to_s(const udp4_config_msg_t * msg) return s; } -#define IN6_LEN sizeof(struct in6_addr) +#define IN6_LEN (size_t) sizeof(struct in6_addr) udp6_config_msg_t * udp6_config_s_to_msg(const struct udp6_config * s) { udp6_config_msg_t * msg; -- cgit v1.2.3