diff --git a/ChangeLog b/ChangeLog index c9616e25c..cd29ffcb7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-07-20 Vladimir Serbinenko + + * font/font.c (find_glyph): Check whether a font is present to avoid + segmentation fault. + 2009-07-20 Joe Auricchio * term/gfxterm.c (grub_virtual_screen_setup): Clear virtual_screen. diff --git a/font/font.c b/font/font.c index 84f0a4260..a81291916 100644 --- a/font/font.c +++ b/font/font.c @@ -607,6 +607,9 @@ find_glyph (const grub_font_t font, grub_uint32_t code) lo = 0; hi = font->num_chars - 1; + if (! table) + return 0; + while (lo <= hi) { mid = lo + (hi - lo) / 2;