
9 Apr
2019
9 Apr
'19
11:03 p.m.
On Sat, 23 Mar 2019 01:29:55 +0000 Andre Przywara andre.przywara@arm.com wrote:
When the character to be printed on a DM_VIDEO console is from the "extended ASCII" range (0x80 - 0xff), it will be treated as a negative number, as it's declared as a signed char. This leads to negative array indicies into the glyph bitmap array, and random garbled characters.
Cast the character to an unsigned type to make the index always positive and avoid an out-of-bounds access.
Signed-off-by: Andre Przywara andre.przywara@arm.com
drivers/video/console_normal.c | 3 ++- drivers/video/console_rotate.c | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-)
Applied (with s/uint8_t/u8/) to u-boot-video/master, thanks!
-- Anatolij