Prevent garbage from getting into aout header
This commit is contained in:
parent
671a78acb0
commit
275f8264e4
1 changed files with 1 additions and 0 deletions
|
@ -1278,6 +1278,7 @@ generate_image (const char *dir, char *prefix, FILE *out, char *mods[],
|
||||||
aout_size = core_size + sizeof (*aout_head);
|
aout_size = core_size + sizeof (*aout_head);
|
||||||
aout_img = xmalloc (aout_size);
|
aout_img = xmalloc (aout_size);
|
||||||
aout_head = aout_img;
|
aout_head = aout_img;
|
||||||
|
grub_memset (aout_head, 0, sizeof (*aout_head));
|
||||||
aout_head->a_midmag = grub_host_to_target32 ((AOUT_MID_SUN << 16)
|
aout_head->a_midmag = grub_host_to_target32 ((AOUT_MID_SUN << 16)
|
||||||
| AOUT32_OMAGIC);
|
| AOUT32_OMAGIC);
|
||||||
aout_head->a_text = grub_host_to_target32 (core_size);
|
aout_head->a_text = grub_host_to_target32 (core_size);
|
||||||
|
|
Loading…
Reference in a new issue