From 9cce63fa339fd9e57845fe7fd90b76c6b18f1790 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 4 Oct 2007 12:38:40 +0200 Subject: [PATCH] add argument checking for edit.c --- commands/edit.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/commands/edit.c b/commands/edit.c index 9998d765c..ae2fb8c40 100644 --- a/commands/edit.c +++ b/commands/edit.c @@ -380,6 +380,11 @@ static int do_edit(cmd_tbl_t * cmdtp, int argc, char *argv[]) int linepos; char c; + if (argc != 2) { + u_boot_cmd_usage(cmdtp); + return 1; + } + buffer = NULL; if(edit_read_file(argv[1])) return 1;