]> git.ipfire.org Git - thirdparty/libarchive.git/commit
Fix NULL pointer dereference in CAB parser during skip 2900/head
authorLoboQ1ng <xpess@qq.com>
Tue, 10 Mar 2026 17:04:43 +0000 (17:04 +0000)
committerLoboQ1ng <xpess@qq.com>
Tue, 10 Mar 2026 17:04:43 +0000 (17:04 +0000)
commit32b62cf785e6d89a6ad525dff631da8a8924cecf
tree22f2627f319f078d4e988da45c492e889196c892
parentdc72e6157e68df64a69b8ff769cf357a9119d929
Fix NULL pointer dereference in CAB parser during skip

When parsing a malformed CAB file, the skip routine (cab_checksum_finish) blindly calculated the checksum on an uninitialized cfdata->memimage. This patch adds a NULL check before the checksum calculation and includes a standalone test case with a minimized malformed payload to prevent regressions.
libarchive/archive_read_support_format_cab.c
libarchive/test/CMakeLists.txt
libarchive/test/test_read_format_cab_skip_malformed.c [new file with mode: 0644]
libarchive/test/test_read_format_cab_skip_malformed.cab.uu [new file with mode: 0644]