[PATCH v2] boot: menu: Do not dereference pointer if pointer is NULL

Tom Rini trini at konsulko.com
Wed Jul 2 15:45:14 CEST 2025


On Wed, Jul 02, 2025 at 10:24:16AM +0100, Andrew Goodbody wrote:

> scene_obj_find can return NULL but this is not checked for before
> the return is dereferenced. Add a NULL check.
> 
> This issue was found by Smatch.
> 
> Also add a NULL check for str.
> 
> Signed-off-by: Andrew Goodbody <andrew.goodbody at linaro.org>

Reviewed-by: Tom Rini <trini at konsulko.com>

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20250702/5dfd32e9/attachment.sig>


More information about the U-Boot mailing list