You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/02/22 08:28:00 UTC

[jira] [Work logged] (COMPRESS-565) Regression - Corrupted headers when using 64 bit ZipArchiveOutputStream

     [ https://issues.apache.org/jira/browse/COMPRESS-565?focusedWorklogId=555677&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-555677 ]

ASF GitHub Bot logged work on COMPRESS-565:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 22/Feb/21 08:27
            Start Date: 22/Feb/21 08:27
    Worklog Time Spent: 10m 
      Work Description: PeterAlfredLee opened a new pull request #169:
URL: https://github.com/apache/commons-compress/pull/169


   Add a new AlwaysWithComestibles in Zip64Mode, this is a compromise for some libraries including 7z and Expand-Archive Powershell utility(and likely Excel).
   
   With `Zip64Mode.AlwaysWithComestibles`, the following fields in Central File Header will be set as needed:
   1. disk number offset in split zip
   2. relative offset of LFH
   3. relative header offset in zip64 extra
   4. disk number start in zip64 extra
   
   These changes are consistent with commit `2b7281`.
   
   It would be good if the generated file in test could tested by Expand-Archive or 7z, but I didn't find a way to detect them in Java.
   
   It's welcome for suggestions about the name `Zip64Mode.AlwaysWithComestibles`  :)
   
   See [COMPRESS-565](https://issues.apache.org/jira/projects/COMPRESS/issues/COMPRESS-565?filter=allissues&orderby=created+DESC%2C+priority+DESC%2C+updated+DESC) for more detailed information.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 555677)
    Remaining Estimate: 0h
            Time Spent: 10m

> Regression - Corrupted headers when using 64 bit ZipArchiveOutputStream
> -----------------------------------------------------------------------
>
>                 Key: COMPRESS-565
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-565
>             Project: Commons Compress
>          Issue Type: Bug
>          Components: Archivers
>    Affects Versions: 1.20
>            Reporter: Evgenii Bovykin
>            Assignee: Peter Lee
>            Priority: Major
>         Attachments: commons-compress-1.21-SNAPSHOT.jar, image-2021-02-20-15-51-21-747.png
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> We've recently updated commons-compress library from version 1.9 to 1.20 and now experiencing the problem that didn't occur before.
>  
> When using ZipArchiveOutputStream to archive 5Gb file and setting the following fields
> {{output.setUseZip64(Zip64Mode.Always)}}
>  {{output.setCreateUnicodeExtraFields(ZipArchiveOutputStream.UnicodeExtraFieldPolicy.ALWAYS)}}
> resulting archive contains corrupted headers.
> *Expand-Archive Powershell utility cannot extract the archive at all with the error about corrupted header. 7zip also complains about it, but can extract the archive.*
>  
> The problem didn't appear when using library version 1.9.
>  
> I've created a sample project that reproduces the error - [https://github.com/missingdays/commons-compress-example]
> Issue doesn't reproduce if you do any of the following:
>  
>  # Downgrade library to version 1.9
>  # Remove output.setCreateUnicodeExtraFields(ZipArchiveOutputStream.UnicodeExtraFieldPolicy.ALWAYS)
>  # Remove output.setUseZip64(Zip64Mode.Always) and zip smaller file (e.g. 1Gb)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)