]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
authorphcoder <phcoder@localhost>
Mon, 20 Jul 2009 17:37:37 +0000 (17:37 +0000)
committerphcoder <phcoder@localhost>
Mon, 20 Jul 2009 17:37:37 +0000 (17:37 +0000)
* font/font.c (find_glyph): Check whether a font is present to avoid
segmentation fault.

ChangeLog
font/font.c

index c9616e25c6cbc6a617fa7671717861ff69bbfa33..cd29ffcb7f4c461484e93441f721141833109c00 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * font/font.c (find_glyph): Check whether a font is present to avoid
+       segmentation fault.
+       
 2009-07-20  Joe Auricchio <jauricchio@gmail.com>
 
        * term/gfxterm.c (grub_virtual_screen_setup): Clear virtual_screen.
index 84f0a42604aceaf362127939ff07c01a1312e888..a81291916310ef997a3bd3931ff95decd98c56fc 100644 (file)
@@ -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;