[PATCH] USB: Fix NULLPTR dereference when serial# is unset

Marek Vasut marex at denx.de
Mon Jan 27 22:18:19 CET 2025


On 1/27/25 10:07 PM, Michael Ferolito wrote:
> The current behaviour of this function will dereference a null pointer
> if the serial# environment variable is unset. This was discovered on a
> board where U-Boot did not have access to the first 256MB of ram,
> resulting in a board crash.
> In the event that U-Boot has full access to memory, it will still read
> from address 0, which is probably not optimal.
> This simple check is enough to fix it.
How does one trigger this problem ?


More information about the U-Boot mailing list