From: Ulrich Drepper Date: Wed, 11 Feb 2009 01:33:57 +0000 (-0800) Subject: Don't write uninitialized data into zeroth section header entry. X-Git-Tag: elfutils-0.140~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=18fb63988e942f3f7156b46169dbf267631816dc;p=thirdparty%2Felfutils.git Don't write uninitialized data into zeroth section header entry. --- diff --git a/libelf/ChangeLog b/libelf/ChangeLog index e6ac1d21b..30118e29f 100644 --- a/libelf/ChangeLog +++ b/libelf/ChangeLog @@ -1,3 +1,8 @@ +2009-02-10 Ulrich Drepper + + * elf32_updatefile.c (updatefile): Fir the zeroth section we still + have to copy the section header. + 2009-02-01 Ulrich Drepper * elf_strptr.c: Add comment re possible problem. diff --git a/libelf/elf32_updatefile.c b/libelf/elf32_updatefile.c index def4c09a7..a4d83a1c6 100644 --- a/libelf/elf32_updatefile.c +++ b/libelf/elf32_updatefile.c @@ -662,7 +662,7 @@ __elfw2(LIBELFBITS,updatefile) (Elf *elf, int change_bo, size_t shnum) /* The dummy section header entry. It should not be possible to mark this "section" as dirty. */ assert ((scn->flags & ELF_F_DIRTY) == 0); - continue; + goto next; } ElfW2(LIBELFBITS,Shdr) *shdr = scn->shdr.ELFW(e,LIBELFBITS);