diff options
Diffstat (limited to 'bfd/compress.c')
-rw-r--r-- | bfd/compress.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bfd/compress.c b/bfd/compress.c index 8bc44de..38eb182 100644 --- a/bfd/compress.c +++ b/bfd/compress.c @@ -585,6 +585,10 @@ bfd_compress_section_contents (bfd *abfd, sec_ptr sec) if (compressed && orig_header_size < 0) abort (); + /* PR 31455: Check for a corrupt uncompressed size. */ + if (uncompressed_size == (bfd_size_type) -1) + return uncompressed_size; + /* Either ELF compression header or the 12-byte, "ZLIB" + 8-byte size, overhead in .zdebug* section. */ if (!new_header_size) |