<table><tr><td style="">rthomsen created this revision.<br />rthomsen added a reviewer: elvisangelaccio.<br />rthomsen added a project: Ark.<br />Restricted Application added subscribers: Ark, kde-utils-devel.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D8400" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>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 <a href="https://bugs.kde.org/show_bug.cgi?id=384622" class="remarkup-link" target="_blank" rel="noreferrer">384622</a>.</p>

<p>We now read each entry and check the CRC checksum against the one given in the file header. We use zlib's <tt style="background: #ebebeb; font-size: 13px;">crc32()</tt> function to compute the checksum.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Open archive attached to bug <a href="https://bugs.kde.org/show_bug.cgi?id=384622" class="remarkup-link" target="_blank" rel="noreferrer">384622</a> and verify that <tt style="background: #ebebeb; font-size: 13px;">Test Integrity</tt> detects the bad checksums.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R36 Ark</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D8400" rel="noreferrer">https://phabricator.kde.org/D8400</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>plugins/libzipplugin/CMakeLists.txt<br />
plugins/libzipplugin/libzipplugin.cpp</div></div></div><br /><div><strong>To: </strong>rthomsen, elvisangelaccio<br /><strong>Cc: </strong>kde-utils-devel, Ark, tctara<br /></div>