Files
binutils-gdb/bfd/compress.c
Alan Modra 322b071c45 asan: invalid free in bfd_init_section_compress_status
With specially crafted compressed sections, it's possible to tickle a
problem when decompressing:  If the compression headers says the
uncompressed size is zero, this will be seen as an error return from
bfd_compress_section_contents.  On errors the caller should free any
malloc'd input buffers, but this isn't really an error and the section
contents have been updated to a bfd_alloc'd buffer which can't be
freed.

	* compress.c (bfd_compress_section_contents): Return -1 as error
	rather than 0.
	(bfd_init_section_compress_status, bfd_compress_section): Adjust.
2023-10-10 22:17:29 +10:30

32 KiB