[PATCH v2020.01] tool: ifwitool: The function localtime() can return NULL.

Simon Glass sjg at chromium.org
Fri Nov 18 19:47:53 CET 2022


On Fri, 18 Nov 2022 at 05:36, Mikhail Ilin <ilin.mikhail.ol at gmail.com> wrote:
>
>  This will cause the local_time pointer is passed as the 4th argument
>  to function strftime() to also point to NULL. This result in a
>  segmentation fault. Thus, it's necessary to add a check of the local_time
>  pointer to NULL.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Signed-off-by: Mikhail Ilin <ilin.mikhail.ol at gmail.com>
> ---
>  tools/ifwitool.c | 2 ++
>  1 file changed, 2 insertions(+)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list