* [U-Boot] [PATCH 1/1] lcd: avoid possible NULL dereference
@ 2017-07-30 19:59 Heinrich Schuchardt
2017-08-01 9:49 ` Simon Glass
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Heinrich Schuchardt @ 2017-07-30 19:59 UTC (permalink / raw)
To: u-boot
Do not dereference bmp before the check if it is NULL.
The problem was indicated by cppcheck.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
common/lcd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/common/lcd.c b/common/lcd.c
index 7e399cee2d..35914960a5 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -578,7 +578,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
unsigned long pwidth = panel_info.vl_col;
unsigned colors, bpix, bmp_bpix;
int hdr_size;
- struct bmp_color_table_entry *palette = bmp->color_table;
+ struct bmp_color_table_entry *palette;
if (!bmp || !(bmp->header.signature[0] == 'B' &&
bmp->header.signature[1] == 'M')) {
@@ -587,6 +587,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
return 1;
}
+ palette = bmp->color_table;
width = get_unaligned_le32(&bmp->header.width);
height = get_unaligned_le32(&bmp->header.height);
bmp_bpix = get_unaligned_le16(&bmp->header.bit_count);
--
2.13.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/1] lcd: avoid possible NULL dereference
2017-07-30 19:59 [U-Boot] [PATCH 1/1] lcd: avoid possible NULL dereference Heinrich Schuchardt
@ 2017-08-01 9:49 ` Simon Glass
2017-08-02 13:03 ` Dr. Philipp Tomsich
2017-08-19 18:51 ` Anatolij Gustschin
2 siblings, 0 replies; 8+ messages in thread
From: Simon Glass @ 2017-08-01 9:49 UTC (permalink / raw)
To: u-boot
On 30 July 2017 at 13:59, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
> Do not dereference bmp before the check if it is NULL.
>
> The problem was indicated by cppcheck.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
> common/lcd.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/1] lcd: avoid possible NULL dereference
2017-07-30 19:59 [U-Boot] [PATCH 1/1] lcd: avoid possible NULL dereference Heinrich Schuchardt
2017-08-01 9:49 ` Simon Glass
@ 2017-08-02 13:03 ` Dr. Philipp Tomsich
2017-08-19 17:37 ` Heinrich Schuchardt
2017-08-19 18:51 ` Anatolij Gustschin
2 siblings, 1 reply; 8+ messages in thread
From: Dr. Philipp Tomsich @ 2017-08-02 13:03 UTC (permalink / raw)
To: u-boot
> On 30 Jul 2017, at 21:59, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> Do not dereference bmp before the check if it is NULL.
>
> The problem was indicated by cppcheck.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/1] lcd: avoid possible NULL dereference
2017-08-02 13:03 ` Dr. Philipp Tomsich
@ 2017-08-19 17:37 ` Heinrich Schuchardt
0 siblings, 0 replies; 8+ messages in thread
From: Heinrich Schuchardt @ 2017-08-19 17:37 UTC (permalink / raw)
To: u-boot
On 08/02/2017 03:03 PM, Dr. Philipp Tomsich wrote:
>
>> On 30 Jul 2017, at 21:59, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>>
>> Do not dereference bmp before the check if it is NULL.
>>
>> The problem was indicated by cppcheck.
>>
>> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
>
> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
>
>
Hello Tom,
the patch
https://patchwork.ozlabs.org/patch/795425/
has received positive reviews both by Philipp and by Simon.
Could you, please, consider merging it.
Best regards
Heinrich
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/1] lcd: avoid possible NULL dereference
2017-07-30 19:59 [U-Boot] [PATCH 1/1] lcd: avoid possible NULL dereference Heinrich Schuchardt
2017-08-01 9:49 ` Simon Glass
2017-08-02 13:03 ` Dr. Philipp Tomsich
@ 2017-08-19 18:51 ` Anatolij Gustschin
2017-08-20 8:32 ` [U-Boot] [PATCH 1/1] lcd: avoid possible NULL dereference - Please update MAINTAINERS Heinrich Schuchardt
2 siblings, 1 reply; 8+ messages in thread
From: Anatolij Gustschin @ 2017-08-19 18:51 UTC (permalink / raw)
To: u-boot
Hi,
On Sun, 30 Jul 2017 21:59:23 +0200
Heinrich Schuchardt xypron.glpk at gmx.de wrote:
> Do not dereference bmp before the check if it is NULL.
>
> The problem was indicated by cppcheck.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
> common/lcd.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Applied to u-boot-video/master, thanks!
--
Anatolij
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/1] lcd: avoid possible NULL dereference - Please update MAINTAINERS
2017-08-19 18:51 ` Anatolij Gustschin
@ 2017-08-20 8:32 ` Heinrich Schuchardt
2017-08-28 20:41 ` Anatolij Gustschin
2017-08-28 20:42 ` Anatolij Gustschin
0 siblings, 2 replies; 8+ messages in thread
From: Heinrich Schuchardt @ 2017-08-20 8:32 UTC (permalink / raw)
To: u-boot
On 08/19/2017 08:51 PM, Anatolij Gustschin wrote:
> Hi,
>
> On Sun, 30 Jul 2017 21:59:23 +0200
> Heinrich Schuchardt xypron.glpk at gmx.de wrote:
>
>> Do not dereference bmp before the check if it is NULL.
>>
>> The problem was indicated by cppcheck.
>>
>> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
>> ---
>> common/lcd.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> Applied to u-boot-video/master, thanks!
>
> --
> Anatolij
>
Hello Anatolij,
thank you for applying the patch.
To clarify the responsibilities could you, please, update your entry in
MAINTAINERS to include
common/lcd*.c
include/lcd*.h
and any other files you care for.
The current entry is:
VIDEO
M: Anatolij Gustschin <agust@denx.de>
S: Maintained
T: git git://git.denx.de/u-boot-video.git
F: drivers/video/
Best regards
Heinrich
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/1] lcd: avoid possible NULL dereference - Please update MAINTAINERS
2017-08-20 8:32 ` [U-Boot] [PATCH 1/1] lcd: avoid possible NULL dereference - Please update MAINTAINERS Heinrich Schuchardt
@ 2017-08-28 20:41 ` Anatolij Gustschin
2017-08-28 20:42 ` Anatolij Gustschin
1 sibling, 0 replies; 8+ messages in thread
From: Anatolij Gustschin @ 2017-08-28 20:41 UTC (permalink / raw)
To: u-boot
Hello Heinrich,
On Sun, 20 Aug 2017 10:32:03 +0200
Heinrich Schuchardt xypron.glpk at gmx.de wrote:
...
> To clarify the responsibilities could you, please, update your entry in
> MAINTAINERS to include
>
> common/lcd*.c
> include/lcd*.h
I've send a patch.
Thanks,
Anatolij
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/1] lcd: avoid possible NULL dereference - Please update MAINTAINERS
2017-08-20 8:32 ` [U-Boot] [PATCH 1/1] lcd: avoid possible NULL dereference - Please update MAINTAINERS Heinrich Schuchardt
2017-08-28 20:41 ` Anatolij Gustschin
@ 2017-08-28 20:42 ` Anatolij Gustschin
1 sibling, 0 replies; 8+ messages in thread
From: Anatolij Gustschin @ 2017-08-28 20:42 UTC (permalink / raw)
To: u-boot
Hello Heinrich,
On Sun, 20 Aug 2017 10:32:03 +0200
Heinrich Schuchardt xypron.glpk at gmx.de wrote:
...
> To clarify the responsibilities could you, please, update your entry in
> MAINTAINERS to include
>
> common/lcd*.c
> include/lcd*.h
I've sent a patch.
Thanks,
Anatolij
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-08-28 20:42 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-30 19:59 [U-Boot] [PATCH 1/1] lcd: avoid possible NULL dereference Heinrich Schuchardt
2017-08-01 9:49 ` Simon Glass
2017-08-02 13:03 ` Dr. Philipp Tomsich
2017-08-19 17:37 ` Heinrich Schuchardt
2017-08-19 18:51 ` Anatolij Gustschin
2017-08-20 8:32 ` [U-Boot] [PATCH 1/1] lcd: avoid possible NULL dereference - Please update MAINTAINERS Heinrich Schuchardt
2017-08-28 20:41 ` Anatolij Gustschin
2017-08-28 20:42 ` Anatolij Gustschin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox