summaryrefslogtreecommitdiffstats
path: root/commands/miitool.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-05-20 09:33:04 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-06-11 08:47:40 +0200
commit68376f82e8a0b01476498849748a27ea18252298 (patch)
treee767f376b59849529993ac0047622fdc6c615bde /commands/miitool.c
parent8e89bc594a8fbc3337a08c2c4ac03519000e89b7 (diff)
downloadbarebox-68376f82e8a0b01476498849748a27ea18252298.tar.gz
barebox-68376f82e8a0b01476498849748a27ea18252298.tar.xz
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 <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/miitool.c')
-rw-r--r--commands/miitool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/miitool.c b/commands/miitool.c
index 5a5278d34d..48c3c4b8cd 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';