mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-17 13:10:12 +08:00
Fix potential illegal memory access in ZLIB because of an erroneous declaration of the size of the input buffer.
* compress.c (bfd_get_full_section_contents): Remember to reduce compressed size by the sizeof the compression header when decompressing the contents.
This commit is contained in:
parent
51547df62c
commit
6438d1be9e
@ -1,3 +1,9 @@
|
||||
2017-02-17 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* compress.c (bfd_get_full_section_contents): Remember to reduce
|
||||
compressed size by the sizeof the compression header when
|
||||
decompressing the contents.
|
||||
|
||||
2017-02-17 Pedro Alves <palves@redhat.com>
|
||||
|
||||
* srec.c (Chunk): Rename to ...
|
||||
|
@ -300,7 +300,7 @@ bfd_get_full_section_contents (bfd *abfd, sec_ptr sec, bfd_byte **ptr)
|
||||
SHF_COMPRESSED section. */
|
||||
compression_header_size = 12;
|
||||
if (!decompress_contents (compressed_buffer + compression_header_size,
|
||||
sec->compressed_size, p, sz))
|
||||
sec->compressed_size - compression_header_size, p, sz))
|
||||
{
|
||||
bfd_set_error (bfd_error_bad_value);
|
||||
if (p != *ptr)
|
||||
|
Loading…
Reference in New Issue
Block a user