From: phcoder Date: Mon, 20 Jul 2009 17:37:37 +0000 (+0000) Subject: 2009-07-20 Vladimir Serbinenko X-Git-Tag: 1.98~692 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57a55913e0edfee615c6007e44ae8a9def785d95;p=thirdparty%2Fgrub.git 2009-07-20 Vladimir Serbinenko * font/font.c (find_glyph): Check whether a font is present to avoid segmentation fault. --- 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;