video/vesa: harden font height parsing

We should not prematurely increment the pointer, to avoid inadvertently
skipping a NUL terminator.

Fixes: 6d9199bd0f ("x86-64: enable hypervisor output on VESA frame buffer")
Reported-by: Kamil Frankowicz <kamil.frankowicz@cert.pl>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: 3bcce461a3
master date: 2026-04-07 13:54:37 +0200
This commit is contained in:
Jan Beulich committed 2026-04-20 12:26:39 +02:00
1 parent afb919ff6a
commit 8f3dcdcf9f
1 file changed
+2 -2
+2 -2
View File
@@ -31,8 +31,8 @@ static unsigned int __initdata vram_remap;
static unsigned int __initdata font_height;
static int __init cf_check parse_font_height(const char *s)
{
if ( simple_strtoul(s, &s, 10) == 8 && (*s++ == 'x') )
font_height = simple_strtoul(s, &s, 10);
if ( simple_strtoul(s, &s, 10) == 8 && (*s == 'x') )
font_height = simple_strtoul(s + 1, &s, 10);
if ( *s != '\0' )
font_height = 0;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.