[PATCH 2/2] cmdline: Fix two related integer underflows

2022-11-26 Thread Ryan Cohen
#x27;s bottom row. When the previously listed replication steps are followed with this patch, the terminal's cursor will be set to the top row and the command line is still usable, even on BIOS systems. Signed-off-by: Ryan Cohen --- grub-core/normal/cmdline.c | 7 ++- 1 file changed, 6 insertio

[PATCH 0/2] Fix command line underflows and out-of-bounds write

2022-11-26 Thread Ryan Cohen
I've included 2 patches so that each bug is fixed. This is my first patch submission for GRUB, so please let me know if there is anything I should change or fix. I really appreciate feedback! Thanks to Daniel Kiper for helping me figure out the process of submitting a patch. :) Ryan Coh

[PATCH 1/2] vga_text: Prevent out-of-bounds writes to VGA text buffer

2022-11-26 Thread Ryan Cohen
Coordinates passed to screen_write_char() did not have any checks to ensure they are not out-of-bounds. This adds an if statement to prevent out-of-bounds writes to the VGA text buffer. Signed-off-by: Ryan Cohen --- grub-core/term/i386/pc/vga_text.c | 3 ++- 1 file changed, 2 insertions(+), 1