diff options
author | Marek Vasut <marek.vasut@gmail.com> | 2011-12-22 09:55:08 +0000 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2012-01-16 08:40:09 +0100 |
commit | e364daf92593e88ea8e26e31e987b1527338869c (patch) | |
tree | 64e16b6b04c96bd8d27bc613ac53648d6aa03637 /tools | |
parent | bd2e27c043ca8c4791b340e2377ddeda545330c4 (diff) |
MX28: Fix MXSBOOT segfault if no params specified
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/mxsboot.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/mxsboot.c b/tools/mxsboot.c index 176753d2ce0..8246831d8ef 100644 --- a/tools/mxsboot.c +++ b/tools/mxsboot.c @@ -606,6 +606,9 @@ int parse_ops(int argc, char **argv) }; int type; + if (argc < 4) + return -1; + for (i = 1; i < argc; i++) { if (!strncmp(argv[i], "-w", 2)) type = PARAM_WRITE; |