|
|
d41074 |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
a85e8e |
From: Trevor Woerner <trevor.woerner@linaro.org>
|
|
|
a85e8e |
Date: Sat, 21 Jun 2014 20:26:47 +0200
|
|
|
d41074 |
Subject: [PATCH] * util/grub-gen-asciih.c (add_glyph): Fix uninitialised
|
|
|
d41074 |
variable.
|
|
|
a85e8e |
|
|
|
a85e8e |
---
|
|
|
a85e8e |
util/grub-gen-asciih.c | 15 +++++++++------
|
|
|
d41074 |
ChangeLog | 4 ++++
|
|
|
a85e8e |
2 files changed, 13 insertions(+), 6 deletions(-)
|
|
|
a85e8e |
|
|
|
a85e8e |
diff --git a/util/grub-gen-asciih.c b/util/grub-gen-asciih.c
|
|
|
d41074 |
index e01447ae94f..e35dcb78fe6 100644
|
|
|
a85e8e |
--- a/util/grub-gen-asciih.c
|
|
|
a85e8e |
+++ b/util/grub-gen-asciih.c
|
|
|
a85e8e |
@@ -81,14 +81,14 @@ add_glyph (FT_UInt glyph_idx, FT_Face face,
|
|
|
a85e8e |
err = FT_Load_Glyph (face, glyph_idx, flag);
|
|
|
a85e8e |
if (err)
|
|
|
a85e8e |
{
|
|
|
a85e8e |
- printf ("Freetype Error %d loading glyph 0x%x for U+0x%x",
|
|
|
a85e8e |
+ fprintf (stderr, "Freetype Error %d loading glyph 0x%x for U+0x%x",
|
|
|
a85e8e |
err, glyph_idx, char_code);
|
|
|
a85e8e |
|
|
|
a85e8e |
if (err > 0 && err < (signed) ARRAY_SIZE (ft_errmsgs))
|
|
|
a85e8e |
- printf (": %s\n", ft_errmsgs[err]);
|
|
|
a85e8e |
+ fprintf (stderr, ": %s\n", ft_errmsgs[err]);
|
|
|
a85e8e |
else
|
|
|
a85e8e |
- printf ("\n");
|
|
|
a85e8e |
- return;
|
|
|
a85e8e |
+ fprintf (stderr, "\n");
|
|
|
a85e8e |
+ exit (1);
|
|
|
a85e8e |
}
|
|
|
a85e8e |
|
|
|
a85e8e |
glyph = face->glyph;
|
|
|
a85e8e |
@@ -128,7 +128,6 @@ add_glyph (FT_UInt glyph_idx, FT_Face face,
|
|
|
a85e8e |
static void
|
|
|
a85e8e |
write_font_ascii_bitmap (FILE *file, FT_Face face)
|
|
|
a85e8e |
{
|
|
|
a85e8e |
- struct grub_glyph_info glyph;
|
|
|
a85e8e |
int char_code;
|
|
|
a85e8e |
|
|
|
a85e8e |
fprintf (file, "/* THIS CHUNK OF BYTES IS AUTOMATICALLY GENERATED */\n");
|
|
|
a85e8e |
@@ -138,10 +137,14 @@ write_font_ascii_bitmap (FILE *file, FT_Face face)
|
|
|
a85e8e |
for (char_code = 0; char_code <= 0x7f; char_code++)
|
|
|
a85e8e |
{
|
|
|
a85e8e |
FT_UInt glyph_idx;
|
|
|
a85e8e |
-
|
|
|
a85e8e |
+ struct grub_glyph_info glyph;
|
|
|
a85e8e |
+
|
|
|
a85e8e |
glyph_idx = FT_Get_Char_Index (face, char_code);
|
|
|
a85e8e |
if (!glyph_idx)
|
|
|
a85e8e |
return;
|
|
|
a85e8e |
+
|
|
|
a85e8e |
+ memset (&glyph, 0, sizeof(glyph));
|
|
|
a85e8e |
+
|
|
|
a85e8e |
add_glyph (glyph_idx, face, char_code, &glyph);
|
|
|
a85e8e |
|
|
|
a85e8e |
if (glyph.width == 8 && glyph.height == 16
|
|
|
d41074 |
diff --git a/ChangeLog b/ChangeLog
|
|
|
d41074 |
index 2a94ad979b3..b5521130874 100644
|
|
|
d41074 |
--- a/ChangeLog
|
|
|
d41074 |
+++ b/ChangeLog
|
|
|
d41074 |
@@ -1,3 +1,7 @@
|
|
|
d41074 |
+2014-06-21 Trevor Woerner <trevor.woerner@linaro.org>
|
|
|
d41074 |
+
|
|
|
d41074 |
+ * util/grub-gen-asciih.c (add_glyph): Fix uninitialised variable.
|
|
|
d41074 |
+
|
|
|
d41074 |
2014-06-21 Vladimir Serbinenko <phcoder@gmail.com>
|
|
|
d41074 |
|
|
|
d41074 |
* grub-core/commands/verify.c (grub_pubkey_open): Trust procfs.
|