Skip to content

Commit 5d4465b

Browse files
committed
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.
1 parent 04395ea commit 5d4465b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bfd/elf-eh-frame.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2506,7 +2506,7 @@ write_dwarf_eh_frame_hdr (bfd *abfd, struct bfd_link_info *info)
25062506
/* FIXME: octets_per_byte. */
25072507
if (!bfd_set_section_contents (abfd, sec->output_section, contents,
25082508
(file_ptr) sec->output_offset,
2509-
sec->size))
2509+
size))
25102510
retval = false;
25112511
out:
25122512
free (contents);

0 commit comments

Comments
 (0)