mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org, Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: Re: [PATCH master] common: console_common: handle NULL dev gracefully in dev_printf
Date: Wed, 13 Mar 2024 11:50:06 +0100	[thread overview]
Message-ID: <171032700643.1320361.12078968624698038490.b4-ty@pengutronix.de> (raw)
In-Reply-To: <20240313092633.3339320-1-a.fatoum@pengutronix.de>


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@pengutronix.de>




      reply	other threads:[~2024-03-13 10:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-13  9:26 Ahmad Fatoum
2024-03-13 10:50 ` Sascha Hauer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=171032700643.1320361.12078968624698038490.b4-ty@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox