From c5b209f2d8ac87a2c2159791e598f823cfbaa78d Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Fri, 6 Dec 2013 11:37:49 +0100 Subject: elftosb: fix crash on invalid command file Change-Id: Ifef61b7ca6a391960d1d696ba455e0d14462c967 --- utils/imxtools/sbtools/elftosb.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'utils/imxtools/sbtools') diff --git a/utils/imxtools/sbtools/elftosb.c b/utils/imxtools/sbtools/elftosb.c index b65b65d402..2a96aecad7 100644 --- a/utils/imxtools/sbtools/elftosb.c +++ b/utils/imxtools/sbtools/elftosb.c @@ -432,6 +432,8 @@ int main(int argc, char **argv) } struct cmd_file_t *cmd_file = db_parse_file(cmd_filename); + if(cmd_file == NULL) + bug("Error parsing command file\n"); struct sb_file_t *sb_file = apply_cmd_file(cmd_file); db_free(cmd_file); -- cgit v1.2.3