]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Memset the whole ehdr structure (though this will only initialize the
authorNicholas Nethercote <njn@valgrind.org>
Fri, 11 Mar 2005 04:47:23 +0000 (04:47 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Fri, 11 Mar 2005 04:47:23 +0000 (04:47 +0000)
padding).

MERGED FROM CVS HEAD

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3276

coregrind/vg_signals.c

index 2fa14c6302b420a1048028043e93392518c13d9c..650c830fd018837c434ca15be88ab67aede584b1 100644 (file)
@@ -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;