
Hi Andre,
On Fri, 22 Mar 2019 at 19:32, 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(-)
Reviewed-by: Simon Glass sjg@chromium.org
Should use u8 instead of uint8_t.
It might make sense to adjust one of the tests to output such a character.
Regards, Simon