diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2016-10-26 13:24:26 +0900 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2016-10-27 00:04:17 +0900 |
commit | c9cb4089974025157a2454d8564316962bf79f0f (patch) | |
tree | be180e64334898d127102ef3472d8262564357ca /tools/fiptool | |
parent | ad09652c41c96cca97cd95a59cdb72644717285d (diff) |
fiptool: fix Segmentation fault when only --verbose option is given
Fix the following bug:
$ tools/fiptool/fiptool -v
Segmentation fault (core dumped)
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'tools/fiptool')
-rw-r--r-- | tools/fiptool/fiptool.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/fiptool/fiptool.c b/tools/fiptool/fiptool.c index b3f02f6c..4b82c37e 100644 --- a/tools/fiptool/fiptool.c +++ b/tools/fiptool/fiptool.c @@ -983,6 +983,8 @@ int main(int argc, char *argv[]) strcmp(argv[0], "--verbose") == 0) { verbose = 1; argc--, argv++; + if (argc < 1) + usage(); } for (i = 0; i < NELEM(cmds); i++) { |