asan: Null-dereference in _bfd_xcoff_copy_private_bfd_data
authorAlan Modra <amodra@gmail.com>
Sat, 1 Jan 2022 03:22:38 +0000 (13:52 +1030)
committerAlan Modra <amodra@gmail.com>
Sat, 1 Jan 2022 03:52:11 +0000 (14:22 +1030)
commitad3d14c47e872fcd13d83c9a255266c7027c8e16
tree15b0215ba2c33bc32cb160ef2ca1e6bf3cabca8d
parentaebb3d543da4d411d3d767912193c3849f59ff99
asan: Null-dereference in _bfd_xcoff_copy_private_bfd_data

sec->output_section will be NULL when objcopy removes sections.

* coff-rs6000.c (_bfd_xcoff_copy_private_bfd_data): Protect against
objcopy removing sections.
bfd/coff-rs6000.c