All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nikita Kiryanov <nikita@compulab.co.il>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] common/lcd: add protection from null bmp pointer
Date: Mon, 20 Aug 2012 09:12:31 +0300	[thread overview]
Message-ID: <5031D54F.8040006@compulab.co.il> (raw)
In-Reply-To: <502F7805.80301@myspectrum.nl>

On 08/18/2012 02:09 PM, Jeroen Hofstee wrote:
> Hi,
>> On 08/16/2012 12:43 PM, Nikita Kiryanov wrote:
>>> If the bmp pointer is null (for example because the environment
>>> variable "splashimage" was not defined) then U-Boot will get stuck
>>> when trying to load the image.
>> Which branch is this? At [1] there is a check for this..
>>
>> 1600         s = getenv("splashimage");
>> 1601         if (s != NULL) {
>> ...
>>
>> Regards,
>> Jeroen
>>
>> [1] .... drivers/video/cfb_console.c.....
> Just ignore above, since there are apparently more BMP drawing routines,
> and I mentioned the wrong one. The same check is in lcd.c though:
>
> 822: if (do_splash && (s = getenv("splashimage")) != NULL) {
>
You are right; the null splashimage scenario was apparently a bad choice of
example. However, lcd_display_bitmap is not a static function, and it 
appears
in lcd.h. This means that someone might use it outside of common/lcd.c 
context,
and for that reason it should be made more fault tolerant.

I'll resubmit the patch without the splashimage example in the commit 
message.
> Regards,
> Jeroen
>

      reply	other threads:[~2012-08-20  6:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-16 10:43 [U-Boot] [PATCH] common/lcd: add protection from null bmp pointer Nikita Kiryanov
2012-08-17 18:13 ` Jeroen Hofstee
2012-08-18 11:09   ` Jeroen Hofstee
2012-08-20  6:12     ` Nikita Kiryanov [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=5031D54F.8040006@compulab.co.il \
    --to=nikita@compulab.co.il \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.