From 68376f82e8a0b01476498849748a27ea18252298 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Tue, 20 May 2014 09:33:04 +0200 Subject: [PATCH] mii-tool: Fix string length media_list writes into a static string. Worst case length of this string is 125 bytes, but the function only allocates 100 bytes. Use 256 bytes which is long enough for some extensions. Signed-off-by: Sascha Hauer --- commands/miitool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/miitool.c b/commands/miitool.c index 5a5278d34..48c3c4b8c 100644 --- a/commands/miitool.c +++ b/commands/miitool.c @@ -61,7 +61,7 @@ const struct { static const char *media_list(unsigned mask, unsigned mask2, int best) { - static char buf[100]; + static char buf[256]; int i; *buf = '\0';