
18 Jan
2017
18 Jan
'17
5:47 p.m.
On 11.01.2017 16:00, Mario Six wrote:
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
Changes in v2:
None
Reviewed-by: Stefan Roese sr@denx.de
Thanks, Stefan