[PATCH 1/2] board: dhelectronics: Check pointer before access in dh_get_value_from_eeprom_buffer()
Tom Rini
trini at konsulko.com
Wed Sep 17 17:07:59 CEST 2025
On Wed, Sep 17, 2025 at 03:54:24PM +0200, Marek Vasut wrote:
> On 9/17/25 3:47 PM, Tom Rini wrote:
> > On Sun, 07 Sep 2025 03:00:46 +0200, Marek Vasut wrote:
> >
> > > The eip pointer in dh_get_value_from_eeprom_buffer() might be NULL.
> > > The current NULL pointer check happens too late, after the eip was
> > > accessed in variable assignment. Reorder the two, so the NULL pointer
> > > check happens first, and any access second, otherwise the access may
> > > trigger a hang or other undefined behavior.
> > >
> > >
> > > [...]
> >
> > Applied to u-boot/next, thanks!
> >
> > [1/2] board: dhelectronics: Check pointer before access in dh_get_value_from_eeprom_buffer()
> > commit: 1c735620e19e2ae07705cc38da1552ee6a696ff0
> > [2/2] board: dhelectronics: Use isascii() before isprint() in dh_read_eeprom_id_page()
> > commit: fd396316432ad4a0f2998ea9eee9720be0e5d5f8
>
> These are bugfixes for master.
OK, I'll apply it there too now, but please note that cover letters /
fixes tags help make it clearer when a fix is important enough to come
in to master later in the cycle vs wait for the next release.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20250917/91fee789/attachment.sig>
More information about the U-Boot
mailing list