[PATCH v4] usb: gadget: g_dnl: Fix NULLPTR dereference when serial# is unset

Mattijs Korpershoek mkorpershoek at baylibre.com
Thu Feb 6 09:08:27 CET 2025


Hi,

On Mon, 27 Jan 2025 21:09:45 -0600, 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
> 
> [...]

Thanks, Applied to https://source.denx.de/u-boot/custodians/u-boot-dfu (u-boot-dfu)

[1/1] usb: gadget: g_dnl: Fix NULLPTR dereference when serial# is unset
      https://source.denx.de/u-boot/custodians/u-boot-dfu/-/commit/dcf1c627cf436191919c5a3b153d1033245b54b7

--
Mattijs


More information about the U-Boot mailing list