You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "kvr000 (via GitHub)" <gi...@apache.org> on 2024/01/27 05:11:08 UTC
[PR] Support preamble garbage in ZipArchiveInputStream [commons-compress]
kvr000 opened a new pull request, #471:
URL: https://github.com/apache/commons-compress/pull/471
`zip` can ignore any garbage at the beginning of file up to certain size. This is supported in `ZipFile` but not in `ZipArchiveInputStream`. This PR fixes that, including correct check for empty archive.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support preamble garbage in ZipArchiveInputStream [commons-compress]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #471:
URL: https://github.com/apache/commons-compress/pull/471#issuecomment-1913667102
## [Codecov](https://app.codecov.io/gh/apache/commons-compress/pull/471?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
Attention: `5 lines` in your changes are missing coverage. Please review.
> Comparison is base [(`86d2232`)](https://app.codecov.io/gh/apache/commons-compress/commit/86d22329e4bfb524694c7012fad066d6b3d15b1e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 80.64% compared to head [(`59777a1`)](https://app.codecov.io/gh/apache/commons-compress/pull/471?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 80.63%.
> Report is 5 commits behind head on master.
| [Files](https://app.codecov.io/gh/apache/commons-compress/pull/471?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [.../compress/archivers/zip/ZipArchiveInputStream.java](https://app.codecov.io/gh/apache/commons-compress/pull/471?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2NvbW1vbnMvY29tcHJlc3MvYXJjaGl2ZXJzL3ppcC9aaXBBcmNoaXZlSW5wdXRTdHJlYW0uamF2YQ==) | 87.80% | [1 Missing and 4 partials :warning: ](https://app.codecov.io/gh/apache/commons-compress/pull/471?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #471 +/- ##
============================================
- Coverage 80.64% 80.63% -0.02%
- Complexity 6777 6781 +4
============================================
Files 348 348
Lines 24901 24926 +25
Branches 4022 4029 +7
============================================
+ Hits 20082 20098 +16
- Misses 3298 3304 +6
- Partials 1521 1524 +3
```
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/commons-compress/pull/471?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support preamble garbage in ZipArchiveInputStream [commons-compress]
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on PR #471:
URL: https://github.com/apache/commons-compress/pull/471#issuecomment-1913740303
@kvr000
Thank you for the clarification; merged.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support preamble garbage in ZipArchiveInputStream [commons-compress]
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory merged PR #471:
URL: https://github.com/apache/commons-compress/pull/471
--
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.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support preamble garbage in ZipArchiveInputStream [commons-compress]
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on PR #471:
URL: https://github.com/apache/commons-compress/pull/471#issuecomment-1913668297
Hello @kvr000
Is this documented anywhere? PREAMBLE_GARBAGE_MAX_SIZE?
--
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.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support preamble garbage in ZipArchiveInputStream [commons-compress]
Posted by "kvr000 (via GitHub)" <gi...@apache.org>.
kvr000 commented on PR #471:
URL: https://github.com/apache/commons-compress/pull/471#issuecomment-1913698763
> Hello @kvr000 Is this documented anywhere? PREAMBLE_GARBAGE_MAX_SIZE?
I haven't found "official" support for skipping the garbage in the specification. `zip` program and `ZipFile` from apache compress naturally do it because they go backward from the end of central directory, though `zip` eventually prints a warning about garbage at the beginning.
I used `4096` as it should be enough for typical case when the program execution is added at the beginning: `#!/usr/bin/env -S whatever with the arguments such as java -Xmx32M -jar`
--
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.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org