DORMANTno replies

[PATCH] iw: fix pointer arithmetic in __print_he_capa

From: Markus Theil <hidden>
Date: 2021-02-13 11:56:25
Subsystem: the rest · Maintainer: Linus Torvalds

Found by fuzzing with clang fuzzer.

Signed-off-by: Markus Theil <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help