mirror of
https://git.proxmox.com/git/grub2
synced 2025-07-21 08:43:51 +00:00
![]() Catch the case where we have a font so big that it causes the number of rows or columns to be 0. Currently we continue and allocate a virtual_screen.text_buffer of size 0. We then try to use that for glpyhs and things go badly. On the emu platform, malloc() may give us a valid pointer, in which case we'll access heap memory which we shouldn't. Alternatively, it may give us NULL, in which case we'll crash. For other platforms, if I understand grub_memalign() correctly, we will receive a valid but small allocation that we will very likely later overrun. Prevent the creation of a virtual screen that isn't at least 40 cols by 12 rows. This is arbitrary, but it seems that if your width or height is half a standard 80x24 terminal, you're probably going to struggle to read anything anyway. Signed-off-by: Daniel Axtens <dja@axtens.net> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> |
||
---|---|---|
.. | ||
arc | ||
arm | ||
efi | ||
i386 | ||
ieee1275 | ||
uboot | ||
xen | ||
at_keyboard.c | ||
gfxterm_background.c | ||
gfxterm.c | ||
morse.c | ||
ns8250.c | ||
ps2.c | ||
serial.c | ||
spkmodem.c | ||
terminfo.c | ||
tparm.c | ||
usb_keyboard.c |