aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/mxsboot.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/mxsboot.c b/tools/mxsboot.c
index 176753d2c..8246831d8 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;