+2020-01-31 Alan Modra <amodra@gmail.com>
+
+ PR 4110
+ * elf.c (setup_group): Don't clear entire section contents,
+ just the padding after group flags. Release alloc'd memory
+ after a seek or read failure.
+
2020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
* peXXigen.c (pe_is_repro): New function.
continue;
}
- memset (shdr->contents, 0, amt);
-
if (bfd_seek (abfd, shdr->sh_offset, SEEK_SET) != 0
|| (bfd_bread (shdr->contents, shdr->sh_size, abfd)
!= shdr->sh_size))
/* PR 17510: If the group contents are even
partially corrupt, do not allow any of the
contents to be used. */
- memset (shdr->contents, 0, amt);
+ bfd_release (abfd, shdr->contents);
+ shdr->contents = NULL;
continue;
}
idx = H_GET_32 (abfd, src);
if (src == shdr->contents)
{
+ dest->shdr = NULL;
dest->flags = idx;
if (shdr->bfd_section != NULL && (idx & GRP_COMDAT))
shdr->bfd_section->flags