]> git.ipfire.org Git - thirdparty/zstd.git/commit
lib/decompress: check for reserved bit corruption in zstd 3840/head
authoraimuz <mr.imuz@gmail.com>
Tue, 28 Nov 2023 13:04:37 +0000 (21:04 +0800)
committeraimuz <mr.imuz@gmail.com>
Tue, 28 Nov 2023 13:04:37 +0000 (21:04 +0800)
commit468bb173782115e7bd2704f3a9e82341912eebd4
treedc9d08e208498c3078008c27010057a97dc7465e
parentce34dc39a07661df751a0a5792aed28bf47dbcac
lib/decompress: check for reserved bit corruption in zstd

The patch adds a validation to ensure that the last field, which is
reserved, must be all-zeroes in ZSTD_decodeSeqHeaders. This prevents
potential corruption from going undetected.

Fixes an issue where corrupted input could lead to undefined behavior
due to improper validation of reserved bits.

Signed-off-by: aimuz <mr.imuz@gmail.com>
lib/decompress/zstd_decompress_block.c