summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ethtool.c5
1 files 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)