Fixes a problem with the BFD library running out of memory because it mistakenly
authorNick Clifton <nickc@redhat.com>
Wed, 30 Apr 2014 16:04:04 +0000 (17:04 +0100)
committerNick Clifton <nickc@redhat.com>
Wed, 30 Apr 2014 16:04:04 +0000 (17:04 +0100)
commita953eec996f2f93914cc78d68d4478a2660432b6
treecfee3d9c40c75de51ab05c29e44fb241dcc836da
parent1cfdf5340af6f07bb44b97c278f7036ef8db5c43
Fixes a problem with the BFD library running out of memory because it mistakenly
thought that an uncompressed .debug_str section was compressed.

* compress.c (bfd_is_section_compressed): When checking the
.debug_str section, also check the fifth byte in the section is
not part of a string.

* binutils-all/debug_str.s: New test.
* binutils-all/debug_str.d: New test control file.
* binutils-all/compress.exp: Run debug_str test.
bfd/ChangeLog
bfd/compress.c
binutils/testsuite/ChangeLog
binutils/testsuite/binutils-all/compress.exp
binutils/testsuite/binutils-all/debug_str.d [new file with mode: 0644]
binutils/testsuite/binutils-all/debug_str.s [new file with mode: 0644]