<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body >Ah, the timestamp actually is not a time_t, they are two shorts (2 bytes<br>long) from which the first one gives the modification time and the second the modification date. So the difference can be some seconds. It is possible that some zip implementations dump the timestamps of the directory creation in the cdir entries and timestamps of the file addition to the local file header. So, the timestamp in the cdir should never be smaller then in local file header. Maybe it is good test of corruption to check that instead of identity.<div><br></div><div>F.<br><br><font size="2">Sent from Samsung Mobile</font> </div><br><br><br>Fridrich Strba <fridrich.strba@graduateinstitute.ch> wrote:<br><br><br>First of all, the timestamps in that file are really bogus, I cannot<br>imagine an ooxml file produces in 2004, only if the machine has wrongly<br>set the clock.<br><br>Second, when working on a zip implementation for libcdr and for the LO<br>shell extension, I realized that the timestamps were never really good<br>to check for consistency with the local entry header and the central<br>directory entry. I think that the best would be to compare them by crc.<br>And one has to take into account that crc can be 0 and then the real crc<br>is to be found just after the stream in a structure that is to be found<br>by a magic and there, it is possible not to have even the real<br>compressed and uncompressed sizes in the local entry header.<br><br>My proposal would be to be much less strict in what we consider as<br>corrupted for the zip-based documents. Instead check things that are for<br>sure to be the same in the two structs, like the encryption, crc32 and<br>compression type.<br><br>Cheers<br><br>F.<br><br>On 21/09/12 22:36, Michael Meeks wrote:<br>> Hi guys,<br>> <br>>  I've not worked out where these odd ZIP container inconsistencies are<br>> coming from, but ... since people appear to see them, presumably it's<br>> worth being more accepting:<br>> <br>>        Not 100% confident about this, the more I read SfxMedium & friends, the<br>> more convinced I am we need some root+branch stream re-work, but hey.<br>> <br>>    I'd love someone expert in writerfilter to review it, and (IMHO) we<br>> need to do the same work for PPTX / XLSX to ensure that we can prompt<br>> and enter the Repair mode. Then I think we need to undo the hack that is<br>> the fix for bug#54609 :-)<br>> <br>>     Thoughts appreciated.<br>> <br>>              Michael.<br>> <br>> <br>> <br>> _______________________________________________<br>> LibreOffice mailing list<br>> LibreOffice@lists.freedesktop.org<br>> http://lists.freedesktop.org/mailman/listinfo/libreoffice<br>> <br><br> </body>