mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 02:50:08 +08:00
mach-o: fix section name conversion from bfd to mach-o.
bfd/ * mach-o.c (bfd_mach_o_convert_section_name_to_mach_o): Fix thinko on names length.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2014-04-04 Tristan Gingold <gingold@adacore.com>
|
||||||
|
|
||||||
|
* mach-o.c (bfd_mach_o_convert_section_name_to_mach_o): Fix
|
||||||
|
thinko on names length.
|
||||||
|
|
||||||
2014-04-04 Tristan Gingold <gingold@adacore.com>
|
2014-04-04 Tristan Gingold <gingold@adacore.com>
|
||||||
|
|
||||||
* mach-o-i386.c (bfd_mach_o_i386_swap_reloc_out): Use target index
|
* mach-o-i386.c (bfd_mach_o_i386_swap_reloc_out): Use target index
|
||||||
|
@ -467,7 +467,8 @@ bfd_mach_o_convert_section_name_to_mach_o (bfd *abfd ATTRIBUTE_UNUSED,
|
|||||||
seglen = dot - name;
|
seglen = dot - name;
|
||||||
seclen = len - (dot + 1 - name);
|
seclen = len - (dot + 1 - name);
|
||||||
|
|
||||||
if (seglen < 16 && seclen < 16)
|
if (seglen <= BFD_MACH_O_SEGNAME_SIZE
|
||||||
|
&& seclen <= BFD_MACH_O_SECTNAME_SIZE)
|
||||||
{
|
{
|
||||||
memcpy (section->segname, name, seglen);
|
memcpy (section->segname, name, seglen);
|
||||||
section->segname[seglen] = 0;
|
section->segname[seglen] = 0;
|
||||||
|
Reference in New Issue
Block a user