DragonFlyBSD Kernel Audit
DF-0269 / fix.diff
← back to finding ↓ download raw
diff --git a/sys/net/sppp/if_spppsubr.c b/sys/net/sppp/if_spppsubr.c
--- a/sys/net/sppp/if_spppsubr.c
+++ b/sys/net/sppp/if_spppsubr.c
@@ -5287,7 +5287,7 @@
 static void
 sppp_print_bytes(const u_char *p, u_short len)
 {
-	char hexstr[len];
+	char hexstr[HEX_NCPYLEN(len)];
 	if (len)
 		log(-1, " %s", hexncpy(p, len, hexstr, HEX_NCPYLEN(len), "-"));
 }