diff options
author | Michael Snyder <msnyder@vmware.com> | 2011-03-06 18:37:07 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2011-03-06 18:37:07 +0000 |
commit | 4281caadcf4f83c91cb8fe635d9fff5afce184ab (patch) | |
tree | 868a531fc13a98df78b74d7fcdd80d2114302a00 /bfd/compress.c | |
parent | 176720017d3856e1c309a7633a7d62a273c7d436 (diff) | |
download | gdb-4281caadcf4f83c91cb8fe635d9fff5afce184ab.zip gdb-4281caadcf4f83c91cb8fe635d9fff5afce184ab.tar.gz gdb-4281caadcf4f83c91cb8fe635d9fff5afce184ab.tar.bz2 |
2011-03-05 Michael Snyder <msnyder@vmware.com>
* compress.c (bfd_compress_section_contents): Check for out of mem.
Diffstat (limited to 'bfd/compress.c')
-rw-r--r-- | bfd/compress.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bfd/compress.c b/bfd/compress.c index a526ea9..669033c 100644 --- a/bfd/compress.c +++ b/bfd/compress.c @@ -100,6 +100,9 @@ bfd_compress_section_contents (bfd *abfd ATTRIBUTE_UNUSED, compressed_size = compressBound (uncompressed_size) + 12; compressed_buffer = (bfd_byte *) bfd_malloc (compressed_size); + if (compressed_buffer == NULL) + return FALSE; + if (compress ((Bytef*) compressed_buffer + 12, &compressed_size, (const Bytef*) uncompressed_buffer, |