[U-Boot] [PATCH v2 15/18] tools: kwbimage: Refactor line parsing and fix error

Stefan Roese sr at denx.de
Wed Feb 1 12:42:31 CET 2017


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 at gdsys.cc>
> ---
> Changes in v2:
>
> None

Applied to u-boot-marvell/master

Thanks,
Stefan


More information about the U-Boot mailing list