9
0
Fork 0

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>
This commit is contained in:
Sascha Hauer 2014-05-20 09:33:04 +02:00
parent 8e89bc594a
commit 68376f82e8
1 changed files with 1 additions and 1 deletions

View File

@ -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';