Description of problem: Running unzip on a file results in a CRC error and incorrect result. Version-Release number of selected component (if applicable): unzip-6.0-12.fc20.x86_64 How reproducible: every time on this file (have not tried any others) Steps to Reproduce: 1. download this 840MB file https://www.dropbox.com/s/4xst9sqhtybzfy0/2014-01-07-wheezy-raspbian-2014-03-12-rpi-touch.zip 2. run unzip and pipe to md5sum 3. Actual results: $ unzip -p 2014-01-07-wheezy-raspbian-2014-03-12-rpi-touch.zip | md5sum - 2014-01-07-wheezy-raspbian-2014-03-12-rpi-touch.img bad CRC 4468cad1 (should be a2b15cd3) 5b3bd0d40794dd47ccb3aebfb404cf22 - Expected results: no crc error, correct md5sum is cd3ff3aa233357ca03a8f781a946d9fb Additional info: Valgrind detects an overlapping memcpy() which I think it fixes and generates the correct md5sum result. This same md5sum is produced when the file is decompressed using the Windows 7 unzip file shell. A similar defect was reported in Debian https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=694601 $ valgrind unzip -p 2014-01-07-wheezy-raspbian-2014-03-12-rpi-touch.zip | md5sum - ==22166== Memcheck, a memory error detector ==22166== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==22166== Using Valgrind-3.9.0 and LibVEX; rerun with -h for copyright info ==22166== Command: unzip -p 2014-01-07-wheezy-raspbian-2014-03-12-rpi-touch.zip ==22166== ==22166== Source and destination overlap in memcpy(0x713480, 0x713484, 5) ==22166== at 0x4A0A403: memcpy@@GLIBC_2.14 (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==22166== by 0x40DF47: inflate_codes (string3.h:51) ==22166== by 0x410C4A: inflate_dynamic (inflate.c:1373) ==22166== by 0x410F56: inflate (inflate.c:1421) ==22166== by 0x407FBB: extract_or_test_entrylist (extract.c:1855) ==22166== by 0x409D1C: extract_or_test_files (extract.c:584) ==22166== by 0x4150A5: process_zipfiles (process.c:987) ==22166== by 0x403B44: unzip (unzip.c:1254) ==22166== by 0x3110C21D64: (below main) (in /usr/lib64/libc-2.18.so) ==22166== ==22166== ==22166== HEAP SUMMARY: ==22166== in use at exit: 0 bytes in 0 blocks ==22166== total heap usage: 1,697,865 allocs, 1,697,865 frees, 592,822,898 bytes allocated ==22166== ==22166== All heap blocks were freed -- no leaks are possible ==22166== ==22166== For counts of detected and suppressed errors, rerun with: -v ==22166== ERROR SUMMARY: 3667 errors from 1 contexts (suppressed: 2 from 2) cd3ff3aa233357ca03a8f781a946d9fb -
overlap is creating due to C optimization bug (comment from author). After few tests I must say that code is OK. Only solution now is really add NOMEMCPY for compilation, which resolve this bug. Will be patched soon
unzip-6.0-13.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/unzip-6.0-13.fc20
Package unzip-6.0-13.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing unzip-6.0-13.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-14480/unzip-6.0-13.fc20 then log in and leave karma (feedback).
unzip-6.0-13.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.