summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2013-12-06 11:37:49 +0100
committerAmaury Pouly <amaury.pouly@gmail.com>2013-12-06 11:37:49 +0100
commitc5b209f2d8ac87a2c2159791e598f823cfbaa78d (patch)
tree9f9d50485372d675637fdedc0281736e9f5553fa
parentf365a5123f69d229b2c74a3c424f78a3915dcc9b (diff)
elftosb: fix crash on invalid command file
Change-Id: Ifef61b7ca6a391960d1d696ba455e0d14462c967
-rw-r--r--utils/imxtools/sbtools/elftosb.c2
1 files changed, 2 insertions, 0 deletions
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);