3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 13:02:44 +01:00
iwd/monitor
James Prestwood 72d35fc491 monitor: use int64_t type for NLMSG_NEXT length
Commit c7640f8346 was meant to fix a sign compare warning
in clang because NLMSG_NEXT internally compares the length
with nlmsghdr->nlmsg_len which is a u32. The problem is the
NLMSG_NEXT can underflow an unsigned value, hence why it
expects an int type to be passed in.

To work around this we can instead pass a larger sized
int64_t which the compiler allows since it can upgrade the
unsigned nlmsghdr->nlmsg_len. There is no underflow risk
with an int64_t either because the buffer used is much
smaller than what can fit in an int64_t.

Fixes: c7640f8346 ("monitor: fix integer comparison error (clang)")
2022-10-14 09:49:13 -05:00
..
display.c monitor: Use include path from top source directory 2019-12-13 09:04:15 +01:00
display.h treewide: Move the Intel copyright forward to 2019 2019-10-25 00:43:08 +02:00
iwmon.rst build: Add skeleton manual pages for all installed binaries 2019-09-22 21:57:47 +02:00
main.c monitor: use int64_t type for NLMSG_NEXT length 2022-10-14 09:49:13 -05:00
nlmon.c monitor: use int64_t type for NLMSG_NEXT length 2022-10-14 09:49:13 -05:00
nlmon.h monitor: use int64_t type for NLMSG_NEXT length 2022-10-14 09:49:13 -05:00
pcap.c treewide: fix typos 2020-01-21 16:03:28 -06:00
pcap.h treewide: Move the Intel copyright forward to 2019 2019-10-25 00:43:08 +02:00