PR25197, assertion fail coffgen.c
authorAlan Modra <amodra@gmail.com>
Tue, 19 Nov 2019 01:08:36 +0000 (11:38 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 19 Nov 2019 02:01:22 +0000 (12:31 +1030)
commitf14080d440fab16dcb498c1a46864a5a1be37aaa
treeb5013d182ac1d7722342c1ce5fa4d93c6ce3fa02
parentdf56ecde8aeed75693f49c9e290427ee5030b05c
PR25197, assertion fail coffgen.c

The testcase in this PR triggered "BFD_ASSERT (p2->is_sym)" by
sneakily generating a C_FILE sym whose value pointed into auxents.
The fix then is in the last changed line of this patch, to check
p->is_sym as well as p->u.syment.n_sclass.  The other changes fix
various overflow checks that weren't as solid as they could be.

PR 25197
* coffgen.c (coff_find_nearest_line_with_names): Check that C_FILE
u.syment.n_value does point at another C_FILE sym and not into
some auxent that happens to look like a C_FILE.  Properly check
for integer overflow and avoid possible pointer wrap-around.
Simplify pr17512 checks.
bfd/ChangeLog
bfd/coffgen.c
This page took 0.024203 seconds and 4 git commands to generate.