Bug 411074 - Decompression errors are not reported
Summary: Decompression errors are not reported
Status: REPORTED
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: 18.12.3
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Elvis Angelaccio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-19 17:31 UTC by Alexander Trufanov
Modified: 2020-11-22 07:50 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Trufanov 2019-08-19 17:31:01 UTC
SUMMARY

Ark extract the file that filled with 0 bytes while WinRar is able to extract it.

STEPS TO REPRODUCE
1. Download an old archive from http://cjb2.narod.ru/cjb2xx0.1.tgz
2. Extract compress.c (the other file is fine) or try to view it

OBSERVED RESULT

Extracted file is filled with 0s

EXPECTED RESULT

Extracted file contains the code

SOFTWARE/OS VERSIONS

Operating System: Kubuntu 19.04
KDE Plasma Version: 5.15.4
KDE Frameworks Version: 5.56.0
Qt Version: 5.12.2
Kernel Version: 5.0.0-25-generic
OS Type: 64-bit
Processors: 4 × Intel® Core™ i7-3520M CPU @ 2.90GHz
Memory: 7,7 GiB of RAM
Comment 1 Alois Wohlschlager 2019-08-20 11:03:28 UTC
Retitled, as the linked archive is corrupted and untarring it on the command-line gives CRC errors.
Comment 2 Ragnar Thomsen 2020-05-04 08:55:54 UTC
Git commit b47c534607e22610b7f80628943227f32fa9948a by Ragnar Thomsen.
Committed on 04/05/2020 at 08:50.
Pushed by rthomsen into branch 'release/20.04'.

libarchive: Improve error-handling when loading archive

Improves error-handling in LibarchivePlugin::list().

Previously we only checked whether we could read until the end of the
archive, and even if we couldn't there was no error shown to the user.
Now we check the return value of both archive_read_next_header() and
archive_read_data_skip(), and show a corrupt archive query if either
was not successful.

This partially solves bug 411074, as Ark now at least gives a warning
when opening a corrupt archive with libarchiveplugin. We still need to
improve error-handling when extracting, but this requires some
refactoring first so will be done later.
Differential Revision: D29383

M  +33   -3    plugins/libarchive/libarchiveplugin.cpp
M  +1    -0    plugins/libarchive/libarchiveplugin.h

https://commits.kde.org/ark/b47c534607e22610b7f80628943227f32fa9948a
Comment 3 Justin Zobel 2020-11-22 07:50:19 UTC
This file is corrupt.

tar xzf cjb2xx0.1.tgz
gzip: stdin: invalid compressed data--crc error

gzip: stdin: invalid compressed data--length error
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now