Bug 452147

Summary: Ark truncates/does not fully unpack .gz gzip files with trailing data
Product: [Applications] ark Reporter: valdikss
Component: generalAssignee: Elvis Angelaccio <elvis.angelaccio>
Status: RESOLVED DUPLICATE    
Severity: major CC: aacid, rthomsen6
Priority: NOR    
Version: 21.12.2   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description valdikss 2022-04-01 12:09:51 UTC
SUMMARY
KDE Ark discards (or does not handle correctly) the latest compressed gzip block if it contains trailing "garbage", *silently* producing truncated unpacked file.


STEPS TO REPRODUCE
1. Download https://downloads.openwrt.org/releases/21.02.0/targets/x86/generic/openwrt-21.02.0-x86-generic-generic-ext4-combined.img.gz
2. Unpack it with Ark
3. Get the unpacked file 126 337 024 bytes in size

OBSERVED RESULT
The resulting file is truncated to 126 337 024 bytes, does not work as intended (disk image does not boot).


EXPECTED RESULT
The resulting file is 126 353 408 bytes in size (16 KiB more), as unpacked with gunzip.


SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 35
KDE Plasma Version: 5.24.3
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.2
Kernel Version: 5.16.17-200.fc35.x86_64 (64-bit)

ADDITIONAL INFORMATION
OpenWRT build system appends signature metadata to the end of .gz file, which for uncompressing program looks like a trailing garbage.
However, gunzip correctly uncompresses the file while Ark seem to discard the last compressed block, silently unpacking incomplete file.
Comment 1 Albert Astals Cid 2022-04-02 11:20:06 UTC

*** This bug has been marked as a duplicate of bug 447563 ***