[U-Boot] [PATCH v2] cfb_console: fix RLE bitmap drawing code

Anatolij Gustschin agust at denx.de
Thu Apr 28 22:02:07 CEST 2011


On Thu, 28 Apr 2011 21:53:11 +0200
Anatolij Gustschin <agust at denx.de> wrote:

> There seems to be tools producing incorrect 'end of bitmap data'
> markers '0100' in a RLE bitmap. Drawing such bitmaps can result
> in overwriting memory above the frame buffer. E.g. on MPC5121e
> based boards this memory can contain U-Boot environment.
> 
> We may not rely on the correct end of bitmap data marker 0001
> only, but also have to check whether we are going to draw a
> valid frame buffer scan line.
> 
> The patch provides a fix by maintaining a pixel counter
> which is incremented by the amount of pixels we are going
> to draw. If the counter exceeds frame buffer pixels limit
> we stop the drawing with the error message.
> 
> Reported-by: Michael Weiss <michael.weiss at ifm.com>
> Signed-off-by: Anatolij Gustschin <agust at denx.de>
> Tested-by: Anatolij Gustschin <agust at denx.de>
> ---
>  drivers/video/cfb_console.c |   19 +++++++++++++++----
>  1 files changed, 15 insertions(+), 4 deletions(-)

applied to u-boot-video/master.


More information about the U-Boot mailing list