From e1944540b8f3008857bc95f3d08a0eb64f19a580 Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Thu, 24 Aug 2006 02:35:51 -0400 Subject: Check for too-long interface names. --- ethtool.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ethtool.c b/ethtool.c index 7d408be..8401582 100644 --- a/ethtool.c +++ b/ethtool.c @@ -624,9 +624,10 @@ static void parse_cmdline(int argc, char **argp) } - if (devname == NULL) { + if (devname == NULL) + show_usage(1); + if (strlen(devname) >= IFNAMSIZ) show_usage(1); - } } static void dump_supported(struct ethtool_cmd *ep) -- cgit v1.2.1