]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Prevent garbage from getting into aout header
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Tue, 5 Jul 2011 12:55:28 +0000 (14:55 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Tue, 5 Jul 2011 12:55:28 +0000 (14:55 +0200)
util/grub-mkimage.c

index 9fc37df2b3362e21c63380be17c933a77b73ab32..042bcf2df589c6d7566ef00608732071b7d392c1 100644 (file)
@@ -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);