> `GZIPInputStream`, when looking for a concatenated stream, relies on what the > underlying `InputStream` says is how many bytes are `available()`. But this > is inappropriate because `InputStream.available()` is just an estimate and is > allowed (for example) to always return zero. > > The fix is to ignore what's `available()` and just proceed and see what > happens. If fewer bytes are available than required, the attempt to extend to > another stream is canceled just as it was before, e.g., when the next stream > header couldn't be read.
Archie Cobbs has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision: - Merge branch 'master' into JDK-7036144 - Merge branch 'master' into JDK-7036144 - Address third round of review comments. - Address second round of review comments. - Address review comments. - Fix bug in GZIPInputStream when underlying available() returns short. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/17113/files - new: https://git.openjdk.org/jdk/pull/17113/files/4f1a0459..f4178acc Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=17113&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=17113&range=04-05 Stats: 38832 lines in 1817 files changed: 17181 ins; 8675 del; 12976 mod Patch: https://git.openjdk.org/jdk/pull/17113.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/17113/head:pull/17113 PR: https://git.openjdk.org/jdk/pull/17113