diff options
| author | Dimitri Staessens <dimitri@ouroboros.rocks> | 2026-02-21 12:13:58 +0100 |
|---|---|---|
| committer | Sander Vrijders <sander@ouroboros.rocks> | 2026-02-22 16:04:24 +0100 |
| commit | 32ec0a2f34a530271a1e5ccf9c64436bd18cd420 (patch) | |
| tree | d568a03caef4b23b66f3844fe89f913467f89a0f /src/lib/protobuf.c | |
| parent | c9662b47be711c00f013ac4606dc86c9a2ad8201 (diff) | |
| download | ouroboros-32ec0a2f34a530271a1e5ccf9c64436bd18cd420.tar.gz ouroboros-32ec0a2f34a530271a1e5ccf9c64436bd18cd420.zip | |
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 <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/lib/protobuf.c')
| -rw-r--r-- | src/lib/protobuf.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |
