Sanity check section size in bfd_init_section_compress_status
authorAlan Modra <amodra@gmail.com>
Wed, 29 Mar 2023 02:15:16 +0000 (12:45 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 29 Mar 2023 02:26:46 +0000 (12:56 +1030)
commitaec101ab06697221d2bc2f82b3a65fb92054ed9f
tree2afb1d407031c1dd3aa4ee6b2fa729c53d02f2d8
parent647744420e69bf5fc8f5ab88a9d7dabd6087a890
Sanity check section size in bfd_init_section_compress_status

This function doesn't just initialise for compression, it actually
compresses.  This patch sanity checks section size before allocating
buffers for the uncompressed contents.

* compress.c (bfd_init_section_compress_status): Sanity check
section size.
bfd/compress.c