aboutsummaryrefslogtreecommitdiff
path: root/gdb/rust-parse.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2023-10-10 18:16:38 +1030
committerAlan Modra <amodra@gmail.com>2023-10-10 22:17:29 +1030
commit322b071c45d5e5ae14d247e8fa74a4cff58e1a8a (patch)
tree01e4f845ca2116b6487d2a57a0ccc446d6abbee7 /gdb/rust-parse.c
parent4825fd2d3552a047264a1f3d900ce30047a8c5f6 (diff)
downloadbinutils-322b071c45d5e5ae14d247e8fa74a4cff58e1a8a.zip
binutils-322b071c45d5e5ae14d247e8fa74a4cff58e1a8a.tar.gz
binutils-322b071c45d5e5ae14d247e8fa74a4cff58e1a8a.tar.bz2
asan: invalid free in bfd_init_section_compress_status
With specially crafted compressed sections, it's possible to tickle a problem when decompressing: If the compression headers says the uncompressed size is zero, this will be seen as an error return from bfd_compress_section_contents. On errors the caller should free any malloc'd input buffers, but this isn't really an error and the section contents have been updated to a bfd_alloc'd buffer which can't be freed. * compress.c (bfd_compress_section_contents): Return -1 as error rather than 0. (bfd_init_section_compress_status, bfd_compress_section): Adjust.
Diffstat (limited to 'gdb/rust-parse.c')
0 files changed, 0 insertions, 0 deletions