]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* font/font.c (grub_font_get_glyph_with_fallback): Avoid dereferencing
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 2 Jul 2010 16:25:42 +0000 (18:25 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 2 Jul 2010 16:25:42 +0000 (18:25 +0200)
NULL font.

ChangeLog
font/font.c

index dcdb3a7ae7e8968d1d314bf98cd31eab14423a46..f26c62431bb87f553405de62789a5c868c942874 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-07-02  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * font/font.c (grub_font_get_glyph_with_fallback): Avoid dereferencing
+       NULL font.
+
 2010-07-02  Colin Watson  <cjwatson@ubuntu.com>
 
        * util/deviceiter.c (grub_util_iterate_devices): Skip device-mapper
index 9a89cadc5676b8cd33cfded18296ca305bff996d..89e99314609aaa6b5bd9b715f38377311eaaa229 100644 (file)
@@ -1029,6 +1029,8 @@ grub_font_get_glyph_with_fallback (grub_font_t font, grub_uint32_t code)
       next = node->next;
 
       glyph = grub_font_get_glyph_internal (curfont, code);
+      if (glyph && !font)
+       return glyph;
       if (glyph)
        {
          int d;