Search Linux Wireless

[PATCH] iw: fix pointer arithmetic in __print_he_capa

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Found by fuzzing with clang fuzzer.

Signed-off-by: Markus Theil <markus.theil@xxxxxxxxxxxxx>
---
 util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/util.c b/util.c
index 12ba218..9f21f5f 100644
--- a/util.c
+++ b/util.c
@@ -1160,7 +1160,7 @@ static void __print_he_capa(const __u16 *mac_cap,
 
 	/* Caller didn't provide ppet; infer it, if there's trailing space. */
 	if (!ppet) {
-		ppet = (const void *)(mcs_set + mcs_used);
+		ppet = (const void *)((const __u8 *)mcs_set + mcs_used);
 		if (mcs_used < mcs_len)
 			ppet_len = mcs_len - mcs_used;
 		else
-- 
2.30.1




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux