aboutsummaryrefslogtreecommitdiff
path: root/gdb/rust-lang.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-10-06 13:38:42 +1030
committerAlan Modra <amodra@gmail.com>2021-10-06 15:30:23 +1030
commit1808483c2f3f323d8e0398282251a85cd956321b (patch)
tree8bcb354ac28060267ad47a80ff98606ed9c65181 /gdb/rust-lang.c
parent0a6041ce9383338fa62acb207683780faaa8b42c (diff)
downloadgdb-1808483c2f3f323d8e0398282251a85cd956321b.zip
gdb-1808483c2f3f323d8e0398282251a85cd956321b.tar.gz
gdb-1808483c2f3f323d8e0398282251a85cd956321b.tar.bz2
PR28402, fail to allocate line number array
This fixes a situation where the COFF code allocated memory for internal representaion arrays before reading the external file data. That meant the allocation didn't have any sanity check against file size. PR 28402 * coffcode.h (buy_and_read): Malloc rather than alloc memory. (coff_slurp_line_table): Read native line number info before allocating memory for internal line number array. Adjust error paths to suit. Remove now unnecessary line number count check. (coff_slurp_reloc_table): Adjust to suit buy_and_read change.
Diffstat (limited to 'gdb/rust-lang.c')
0 files changed, 0 insertions, 0 deletions