Fix potential illegal memory access in ZLIB because of an erroneous declaration of...
[deliverable/binutils-gdb.git] / bfd / compress.c
index 1ed7d74bf897939ae2e363b8adb475ea7f2fdc31..f881c074b856d8da7c8626890b1abc3377948123 100644 (file)
@@ -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)
This page took 0.023235 seconds and 4 git commands to generate.