From: Nicholas Nethercote Date: Fri, 11 Mar 2005 04:47:23 +0000 (+0000) Subject: Memset the whole ehdr structure (though this will only initialize the X-Git-Tag: svn/VALGRIND_3_0_0~1042 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fdfc8ecaf7f7a9ca6abf393b34eb10c8e50c7d48;p=thirdparty%2Fvalgrind.git Memset the whole ehdr structure (though this will only initialize the padding). MERGED FROM CVS HEAD git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3276 --- diff --git a/coregrind/vg_signals.c b/coregrind/vg_signals.c index 2fa14c6302..650c830fd0 100644 --- a/coregrind/vg_signals.c +++ b/coregrind/vg_signals.c @@ -927,7 +927,7 @@ static Bool should_dump(const Segment *seg) static void fill_ehdr(Elf32_Ehdr *ehdr, Int num_phdrs) { - VG_(memset)(ehdr, 0, sizeof(ehdr)); + VG_(memset)(ehdr, 0, sizeof(*ehdr)); VG_(memcpy)(ehdr->e_ident, ELFMAG, SELFMAG); ehdr->e_ident[EI_CLASS] = VG_ELF_CLASS;