alpha-vms: Sanity check ETIR__C_CTL_DFLOC index
authorAlan Modra <amodra@gmail.com>
Thu, 26 Mar 2020 00:19:27 +0000 (10:49 +1030)
committerAlan Modra <amodra@gmail.com>
Thu, 26 Mar 2020 00:32:58 +0000 (11:02 +1030)
commitf75fbe8ad2e3d9b34bf1f448a6df328ff361822f
tree59a87f782ad6c3ba3af0de9bd3adfd824ac39019
parent46b438bb7369a55eefef15cd5d1afbb5c2c5742e
alpha-vms: Sanity check ETIR__C_CTL_DFLOC index

I doubt anyone will want to create more than 16M debug location
entries.  If there is no bound the object format allows for 32-bit
indices and of course fuzzers find that and attempt allocation of up
to a 16G byte array.  The patch also fixes potential integer overflows
in calculating the array size.

* vms-alpha.c (dst_define_location): Limit size of dst_ptr_offsets
array.
(_bfd_vms_slurp_object_records): Rename "err" to "ok".
bfd/ChangeLog
bfd/vms-alpha.c
This page took 0.025326 seconds and 4 git commands to generate.