From: Wolfgang Denk Date: Fri, 21 Jul 2006 09:20:46 +0000 (+0200) Subject: Check argument count in "mii" command. X-Git-Tag: U-Boot-1_1_5~90 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=311d802790d987e7ce04f5b0dd0527cc8a6c09e6;p=u-boot Check argument count in "mii" command. Problem pointed out by Andrew Dyer, 13 Jun 2005 --- diff --git a/CHANGELOG b/CHANGELOG index 41fd312f8b..4f6da77a69 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,9 @@ Changes since U-Boot 1.1.4: ====================================================================== +* Check argument count in "mii" command. + Problem pointed out by Andrew Dyer, 13 Jun 2005 + * Cleanup TQM5200 board configurations: - make highboot configurations use environment at high end, too, to avoid flash fragmentation diff --git a/common/cmd_mii.c b/common/cmd_mii.c index 48a4e77c55..ee5e43ee8c 100644 --- a/common/cmd_mii.c +++ b/common/cmd_mii.c @@ -57,6 +57,11 @@ int do_mii (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) int rcode = 0; char *devname; + if (argc < 2) { + printf ("Usage:\n%s\n", cmdtp->usage); + return 1; + } + #if defined(CONFIG_8xx) || defined(CONFIG_MCF52x2) mii_init (); #endif