Re: Bug 23686, two segment faults in nm
authorAlan Modra <amodra@gmail.com>
Sat, 20 May 2023 11:30:25 +0000 (21:00 +0930)
committerAlan Modra <amodra@gmail.com>
Sat, 20 May 2023 11:36:03 +0000 (21:06 +0930)
commit0bbd2b1ad0426aee86445cd7f0c86667624da7ca
treecf5429002a2d28ce6b29a803df6e2ea3e4afdc92
parentcb3f0ff4795381fb19e128a85e258149ebed9cd6
Re: Bug 23686, two segment faults in nm

The fix for pr23686 had a hole in the reloc address sanity check,
the calculation could overflow.  Note that stabsize is known to be a
non-zero multiple of 12 so stabsize - 4 can't underflow.

PR 23686
* syms.c (_bfd_stab_section_find_nearest_line): Correct
r->address sanity check.
bfd/syms.c