> I do not have much background in LZW compression or in C, but I'm reasonably > confident this resolves the problem I'm observing. It looks like the > GifImageDecoder was not always correctly handling compression codes after the > table reached its limit of ~4096. If anyone has suggestions for improvements > I'm happy to make adjustments. > > Luckily while debugging this: I was able to compare the flawed implementation > (GifImageDecoder) with ImageIO's implementation (GIFImageReader) to help > identify how the suffix/prefix tables are supposed to work. > > ImageIO's implementation may have suffered a similar bug (maybe > https://bugs.openjdk.org/browse/JDK-7131823 ?), and that appears to have been > backported. > > I have dozens of additional test cases for this problem, but unfortunately I > don't have the rights to commit them to the OpenJDK repo. Feel free to email > me for additional context/test cases.
Jeremy Wood 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 17 additional commits since the last revision: - Merge branch 'master' into JDK-8351913 - Merge branch 'master' of https://github.com/mickleness/jdk - Merge branch 'master' of https://github.com/mickleness/jdk - 8351913: changing whitespace (PR review) - 8351913: changing whitespace These are flagged as "Whitespace errors" by an automated OpenJDK script https://github.com/openjdk/jdk/pull/24271/checks?check_run_id=39489913895 - Merge branch 'master' into JDK-8351913 - Merge branch 'master' of https://github.com/mickleness/jdk - 8351913: code cleanup - 8351913: support decoding LZW image data with 4095 entries - Merge branch 'openjdk:master' into master - ... and 7 more: https://git.openjdk.org/jdk/compare/ad29194c...d555631c ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24271/files - new: https://git.openjdk.org/jdk/pull/24271/files/e2ab9492..d555631c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24271&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24271&range=01-02 Stats: 271008 lines in 2137 files changed: 70273 ins; 193504 del; 7231 mod Patch: https://git.openjdk.org/jdk/pull/24271.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24271/head:pull/24271 PR: https://git.openjdk.org/jdk/pull/24271