* grub-core/term/gfxterm.c (grub_gfxterm_putchar): Don't set values

outside of range.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-12-25 16:15:01 +01:00
parent 4d8c476536
commit 63fa8ef94e
2 changed files with 9 additions and 2 deletions

View file

@ -893,7 +893,9 @@ grub_gfxterm_putchar (struct grub_term_output *term,
{
unsigned i;
for (i = 1; i < char_width; i++)
for (i = 1; i < char_width && p + i <
virtual_screen.text_buffer + virtual_screen.columns
* virtual_screen.rows; i++)
{
grub_free (p[i].code);
p[i].code = grub_unicode_glyph_from_code (' ');