mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
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:3bcce461a3master date: 2026-04-07 13:54:37 +0200
This commit is contained in:
1 parent
afb919ff6a
commit
8f3dcdcf9f
1 file changed
+2
-2
@@ -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;
|
||||
|
||||
|
||||