D8400: libzip: Improve test archive function
Ragnar Thomsen
noreply at phabricator.kde.org
Sat Oct 21 16:27:08 UTC 2017
rthomsen created this revision.
rthomsen added a reviewer: elvisangelaccio.
rthomsen added a project: Ark.
Restricted Application added subscribers: Ark, kde-utils-devel.
REVISION SUMMARY
The old test implementation only opens the archive with some additional checks, but fails to detect archives with CRC errors for entries, e.g. in bug 384622 <https://bugs.kde.org/show_bug.cgi?id=384622>.
We now read each entry and check the CRC checksum against the one given in the file header. We use zlib's `crc32()` function to compute the checksum.
TEST PLAN
Open archive attached to bug 384622 <https://bugs.kde.org/show_bug.cgi?id=384622> and verify that `Test Integrity` detects the bad checksums.
REPOSITORY
R36 Ark
REVISION DETAIL
https://phabricator.kde.org/D8400
AFFECTED FILES
plugins/libzipplugin/CMakeLists.txt
plugins/libzipplugin/libzipplugin.cpp
To: rthomsen, elvisangelaccio
Cc: kde-utils-devel, #ark, tctara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-utils-devel/attachments/20171021/27bb824a/attachment.html>
More information about the Kde-utils-devel
mailing list