diff mbox series

iw: fix pointer arithmetic in __print_he_capa

Message ID 20210213114853.17276-1-markus.theil@tu-ilmenau.de
State New
Headers show
Series iw: fix pointer arithmetic in __print_he_capa | expand

Commit Message

Markus Theil Feb. 13, 2021, 11:48 a.m. UTC
Found by fuzzing with clang fuzzer.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
---
 util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

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