On Thu, Aug 3, 2023 at 6:27 AM Richard Biener via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > zstdtest has some inline data where some testcases lack the > uncompressed length field. Thus it computes that but still > ends up allocating memory for the uncompressed buffer based on > that (zero) length. Oops. Causes memory corruption if the > allocator returns non-NULL. > > Tested on x86_64-unknown-linux-gnu, pushed as obvious. > > libbacktrace/ > * zstdtest.c (test_samples): Properly compute the allocation > size for the uncompressed data.
Thanks. Ian