|
|
a85e8e |
From 002c7908388cea822217b6a907de419676d6e4b8 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
|
|
|
a85e8e |
Subject: [PATCH 083/260] * util/grub-gen-asciih.c (add_glyph): Fix
|
|
|
a85e8e |
uninitialised variable.
|
|
|
a85e8e |
|
|
|
a85e8e |
---
|
|
|
a85e8e |
ChangeLog | 4 ++++
|
|
|
a85e8e |
util/grub-gen-asciih.c | 15 +++++++++------
|
|
|
a85e8e |
2 files changed, 13 insertions(+), 6 deletions(-)
|
|
|
a85e8e |
|
|
|
a85e8e |
diff --git a/ChangeLog b/ChangeLog
|
|
|
a85e8e |
index 2a94ad979..b55211308 100644
|
|
|
a85e8e |
--- a/ChangeLog
|
|
|
a85e8e |
+++ b/ChangeLog
|
|
|
a85e8e |
@@ -1,3 +1,7 @@
|
|
|
a85e8e |
+2014-06-21 Trevor Woerner <trevor.woerner@linaro.org>
|
|
|
a85e8e |
+
|
|
|
a85e8e |
+ * util/grub-gen-asciih.c (add_glyph): Fix uninitialised variable.
|
|
|
a85e8e |
+
|
|
|
a85e8e |
2014-06-21 Vladimir Serbinenko <phcoder@gmail.com>
|
|
|
a85e8e |
|
|
|
a85e8e |
* grub-core/commands/verify.c (grub_pubkey_open): Trust procfs.
|
|
|
a85e8e |
diff --git a/util/grub-gen-asciih.c b/util/grub-gen-asciih.c
|
|
|
a85e8e |
index e01447ae9..e35dcb78f 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
|
|
|
a85e8e |
--
|
|
|
a85e8e |
2.13.0
|
|
|
a85e8e |
|