[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 15:47:39 CEST 2025


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
-- 
Tom




More information about the U-Boot mailing list