Re: [PATCH] hw/display/omap_lcdc: Fix potential NULL pointer dereference

2020-10-30 Thread AlexChen
On 2020/10/30 22:35, Peter Maydell wrote: > On Fri, 30 Oct 2020 at 14:29, Peter Maydell wrote: >> >> On Fri, 30 Oct 2020 at 10:23, AlexChen wrote: >>> >>> In omap_lcd_interrupts(), the pointer omap_lcd is dereferenced before >>> being check if it is valid, which may lead to NULL pointer dereferen

Re: [PATCH] hw/display/omap_lcdc: Fix potential NULL pointer dereference

2020-10-30 Thread Peter Maydell
On Fri, 30 Oct 2020 at 14:29, Peter Maydell wrote: > > On Fri, 30 Oct 2020 at 10:23, AlexChen wrote: > > > > In omap_lcd_interrupts(), the pointer omap_lcd is dereferenced before > > being check if it is valid, which may lead to NULL pointer dereference. > > So move the assignment to surface afte

Re: [PATCH] hw/display/omap_lcdc: Fix potential NULL pointer dereference

2020-10-30 Thread Peter Maydell
On Fri, 30 Oct 2020 at 10:23, AlexChen wrote: > > In omap_lcd_interrupts(), the pointer omap_lcd is dereferenced before > being check if it is valid, which may lead to NULL pointer dereference. > So move the assignment to surface after checking that the omap_lcd is valid. > > Reported-by: Euler Ro

[PATCH] hw/display/omap_lcdc: Fix potential NULL pointer dereference

2020-10-30 Thread AlexChen
In omap_lcd_interrupts(), the pointer omap_lcd is dereferenced before being check if it is valid, which may lead to NULL pointer dereference. So move the assignment to surface after checking that the omap_lcd is valid. Reported-by: Euler Robot Signed-off-by: Alex Chen --- hw/display/omap_lcdc.c