vms buffer overflows and large memory allocation
authorAlan Modra <amodra@gmail.com>
Mon, 24 Feb 2020 01:22:03 +0000 (11:52 +1030)
committerAlan Modra <amodra@gmail.com>
Mon, 24 Feb 2020 02:05:05 +0000 (12:35 +1030)
commitc893ce360a81bed57b9256f9d065541c2f8175c0
tree043d6f5c61b8f144ffc063c8b68a6f343b2f461f
parent23c4ec6f0279d424899dbdab26d05426aebeba80
vms buffer overflows and large memory allocation

* vms-lib.c (struct carsym_mem): Add limit.
(vms_add_index): Heed limit.
(vms_traverse_index): Catch buffer overflows.  Remove outdated fixme.
(vms_lib_read_index): Set up limit.  Catch 32-bit overflow.
Always return actual number read.
(_bfd_vms_lib_archive_p): Catch buffer overflows.  Replace
assertion with error exit.
bfd/ChangeLog
bfd/vms-lib.c