Re: [PATCH master] common: console_common: handle NULL dev gracefully in dev_printf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 13 Mar 2024 10:26:33 +0100, Ahmad Fatoum wrote:
> dev_name(NULL) returns NULL, which snprintf can handle, but dev->driver
> used beforehand would derference the NULL pointer without checking.
> 
> Fix this by checking that dev is !NULL before dereferencing.
> This still leads to an ugly <NULL>: prefix, when a NULL dev is used, so
> it can be fixed, but without the crash, which might be difficult to
> pinpoint if the print happens early.
> 
> [...]

Applied, thanks!

[1/1] common: console_common: handle NULL dev gracefully in dev_printf
      https://git.pengutronix.de/cgit/barebox/commit/?id=d20abb491654 (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux