Skip to content
Snippets Groups Projects
Commit 74446b63 authored by Anatolij Gustschin's avatar Anatolij Gustschin
Browse files

cfb_console: fix RLE bitmap drawing code


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: default avatarMichael Weiss <michael.weiss@ifm.com>
Signed-off-by: default avatarAnatolij Gustschin <agust@denx.de>
Tested-by: default avatarAnatolij Gustschin <agust@denx.de>
parent a000b795
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment