summaryrefslogtreecommitdiff
path: root/tools/relocate-rela.c
diff options
context:
space:
mode:
authorMario Six <mario.six@gdsys.cc>2017-01-11 15:00:59 (GMT)
committerStefan Roese <sr@denx.de>2017-02-01 08:04:11 (GMT)
commit4991b4f7f1e55fed161462cefca7fe483fd3e477 (patch)
tree7f523fa38e7ad321207b638c3980cc1edfa4d41b /tools/relocate-rela.c
parent79066ef8c9d3c56b46e41c290ae0f598a6d1c59f (diff)
downloadu-boot-fsl-qoriq-4991b4f7f1e55fed161462cefca7fe483fd3e477.tar.xz
tools: kwbimage: Refactor line parsing and fix error
The function image_create_config_parse_oneline is pretty complex, and since more parameters will be added to support secure booting, we refactor the function to make it more readable. Also, when a line contained just a keyword without any parameters, strtok_r returned NULL, which was then indiscriminately fed into atoi, causing a segfault. To correct this, we add a NULL check before feeding the extracted token to atoi, and print an error message in case the token is NULL. Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'tools/relocate-rela.c')
0 files changed, 0 insertions, 0 deletions