From 0fcd9a48603497dcc2727570a50a4401bb0fd085 Mon Sep 17 00:00:00 2001 From: Matt Fleming Date: Mon, 16 Jul 2012 20:03:43 +0100 Subject: [PATCH] efi: Zero e_hdr_pe32p before use We were erroneously zero'ing e_hdr when we should have been zero'ing e_hdr_pe32p. Signed-off-by: Matt Fleming --- efi/wrapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/efi/wrapper.c b/efi/wrapper.c index 4e1c5fc..0943534 100644 --- a/efi/wrapper.c +++ b/efi/wrapper.c @@ -113,7 +113,7 @@ static void write_header(FILE *f, __uint32_t entry, __uint32_t so_size, __uint8_ o_hdr_pe32p.code_sz = total_sz; o_hdr_pe32p.entry_point = entry; fwrite(&o_hdr_pe32p, sizeof(o_hdr_pe32p), 1, f); - memset(&e_hdr, 0, sizeof(e_hdr)); + memset(&e_hdr_pe32p, 0, sizeof(e_hdr)); e_hdr_pe32p.section_align = 4096; e_hdr_pe32p.file_align = 512; e_hdr_pe32p.image_sz = total_sz; -- 2.7.4