]> git.ipfire.org Git - thirdparty/gcc.git/commit
[libbacktrace] fix up broken test
authorRichard Biener <rguenther@suse.de>
Thu, 3 Aug 2023 13:21:51 +0000 (15:21 +0200)
committerRichard Biener <rguenther@suse.de>
Thu, 3 Aug 2023 13:26:04 +0000 (15:26 +0200)
commita9b6043983b2ebd9d5c0f72043b17110b54f1910
tree9bf8a47dfcbcc265d577699b892b446506ece1f9
parent9524718654c3e4a13dd88bc1ac6409da1ec44e71
[libbacktrace] fix up broken test

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.

libbacktrace/
* zstdtest.c (test_samples): Properly compute the allocation
size for the uncompressed data.
libbacktrace/zstdtest.c