From 275f8264e42781db403a26871462a6a25e53bb50 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Tue, 5 Jul 2011 14:55:28 +0200 Subject: [PATCH] Prevent garbage from getting into aout header --- util/grub-mkimage.c | 1 + 1 file changed, 1 insertion(+) diff --git a/util/grub-mkimage.c b/util/grub-mkimage.c index 9fc37df2b..042bcf2df 100644 --- a/util/grub-mkimage.c +++ b/util/grub-mkimage.c @@ -1278,6 +1278,7 @@ generate_image (const char *dir, char *prefix, FILE *out, char *mods[], aout_size = core_size + sizeof (*aout_head); aout_img = xmalloc (aout_size); aout_head = aout_img; + grub_memset (aout_head, 0, sizeof (*aout_head)); aout_head->a_midmag = grub_host_to_target32 ((AOUT_MID_SUN << 16) | AOUT32_OMAGIC); aout_head->a_text = grub_host_to_target32 (core_size);