]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - bfd/libbfd-in.h
file size check in _bfd_alloc_and_read
authorAlan Modra <amodra@gmail.com>
Wed, 19 Feb 2020 02:52:39 +0000 (13:22 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 19 Feb 2020 03:30:55 +0000 (14:00 +1030)
commit2c7c5554df19e410ea3a7d78b0c1435967a4bc62
treeef0005f480637a4a474d1b23ff632caae8bf129c
parent2bb3687ba8720558082d1575823868286d7916b5
file size check in _bfd_alloc_and_read

* coffgen.c (_bfd_coff_get_external_symbols): Remove file size check.
* elf.c (bfd_elf_get_str_section): Likewise.
(_bfd_elf_slurp_version_tables): Likewise.
* libbfd-in.h (_bfd_constant_p): Define.
(_bfd_alloc_and_read, _bfd_malloc_and_read): Check read size against
file size before allocating memory.
* libbfd.h: Regenerate.
bfd/ChangeLog
bfd/coffgen.c
bfd/elf.c
bfd/libbfd-in.h
bfd/libbfd.h