]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
PR28530, Hang in objdump on machine with 196GB RAM
authorAlan Modra <amodra@gmail.com>
Fri, 5 Nov 2021 03:37:56 +0000 (14:07 +1030)
committerAlan Modra <amodra@gmail.com>
Fri, 5 Nov 2021 03:45:18 +0000 (14:15 +1030)
commitc5967f38de59c7375970c09b2c8b8702a01eb9d2
tree21419b8ba4297ff9b92edb3a47dbedc953b278ea
parenta3c0896d80d21545bd8036deb5e1ad4027db5677
PR28530, Hang in objdump on machine with 196GB RAM

Investigating the PR28530 testcase, which has a fuzzed compression
header with an enormous size, I noticed that decompress_contents is
broken when the size doesn't fit in strm.avail_out.  It wouldn't be
too hard to support larger sizes (patches welcome!) but for now just
stop decompress_contents from returning rubbish.

PR 28530
* compress.c (decompress_contents): Fail when uncompressed_size
is too big.
(bfd_init_section_decompress_status): Likewise.
bfd/compress.c