Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There's more than one way to read a zip.

7-zip reads the zip file by scanning from the beginning of the file for the first entry signature (which need not be at the start of the file, which is why this trick works at all.)

WinRAR reads the central directory located at the end of the file, which is technically how you're supposed to do it, but entry offsets given in the central directory are messed up by the existence of the JPG data at the beginning of the file. There also appears to be ~61KB of garbage data at the end of the file, which will trip up some zip readers that use the central directory.

tl;dr: The zip file technically malformed, whether or not a given archive reader will choke on it depends on which technique they use and how forgiving their implementation is.



Thanks for the detailed explanation.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: