]> git.dujemihanovic.xyz Git - u-boot.git/commit
test: compression: check with trailing garbage in input
authorBrandon Maier <brandon.maier@collins.com>
Wed, 28 Dec 2022 22:53:51 +0000 (16:53 -0600)
committerTom Rini <trini@konsulko.com>
Wed, 11 Jan 2023 20:02:24 +0000 (15:02 -0500)
commit43b059884ae1c52a197529b3ac81046d582fb60f
tree99d716e96e11513be337c314ef06ec571f5e4cb9
parentbf48dde80a6c302b3279fe8ed1e5eb9e8fef4abd
test: compression: check with trailing garbage in input

The Linux kernel appends 4 bytes to the end of compressed kernel Images
containing the uncompressed image size. They are used to make
self-decompressing Images easier. However for archs that don't support
self-decompression, like ARM64, U-Boot must be able to decompress the
image with the garbage data.

The existing decompressors already support this. This unit test was
added while working on zstd support as upstream zstd will error if there
is garbage data in the input buffer, and special care was needed to
support this.

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
test/compression.c