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.
|| sec->size == 0
|| sec->rawsize != 0
|| sec->contents != NULL
- || sec->compress_status != COMPRESS_SECTION_NONE)
+ || sec->compress_status != COMPRESS_SECTION_NONE
+ || _bfd_section_size_insane (abfd, sec))
{
bfd_set_error (bfd_error_invalid_operation);
return false;