PR 33021, buffer overflow in write_dwarf_eh_frame_hdr

	* elf-eh-frame.c (write_dwarf_eh_frame_hdr): Use size of
	contents, not section size, in bfd_set_section_contents call.
diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c
index 78b3ecb..0250a8f 100644
--- a/bfd/elf-eh-frame.c
+++ b/bfd/elf-eh-frame.c
@@ -2506,7 +2506,7 @@
   /* FIXME: octets_per_byte.  */
   if (!bfd_set_section_contents (abfd, sec->output_section, contents,
 				 (file_ptr) sec->output_offset,
-				 sec->size))
+				 size))
     retval = false;
  out:
   free (contents);