[PATCH master] font: fbconsole: fix underflow when printing non-ASCII characters
Sascha Hauer
s.hauer at pengutronix.de
Tue Apr 22 05:15:44 PDT 2025
On Tue, 22 Apr 2025 07:36:41 +0200, Ahmad Fatoum wrote:
> With signed characters, non-ASCII characters (i.e. valued >= 128)
> are negative and remain so when casted to int.
>
> find_font_index will thus multiply the index with a negative number and
> look for font data before the actual start of the font.
>
> A cast to unsigned fixes this, because all fonts that trigger this if
> clause's branch have 256 characters.
>
> [...]
Applied, thanks!
[1/1] font: fbconsole: fix underflow when printing non-ASCII characters
https://git.pengutronix.de/cgit/barebox/commit/?id=fbf4d8e13976 (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer at pengutronix.de>
More information about the barebox
mailing list