> Fixing incorrectly generated header for `jfif-and-exif.jpg` to support JDK 
> built with `--with-libjpeg=system`. 
> 
> The test fixture jfif-and-exif.jpg (added by JDK-8160327) currently is a 
> malformed JPEG. Builds that bundle OpenJDK's libjpeg pass because the 
> jdmarker.c leniency patch (JDK-4511441) lets the reader skip the resulting 
> bogus marker and resync. Builds configured --with-libjpeg=system reject it 
> with `javax.imageio.IIOException: Unsupported marker type 0xf7`
> 
> The core of the issues seems to be a stale test resource, not a product bug. 
> JDK-8351110 later added a guard to the JFIF writer so it can no longer emit a 
> thumbnail that overflows the header length, which confirms the checked-in 
> fixture is invalid. Here I'm regenerating the header correctly and fixing the 
> test size.
> 
> Testing:
> * GHA Sanity Checks
> * Adjusted `JpegExifThumbnailTest.java` test using builds with and without 
> `--with-libjpeg=system`
> ---------
> - [X] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Satyen Subramaniam has updated the pull request incrementally with one 
additional commit since the last revision:

  Regenerating .jpg by resampling, updating copyright

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/33452/files
  - new: https://git.openjdk.org/jdk/pull/33452/files/a6dfc313..8aa5a706

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=33452&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=33452&range=00-01

  Stats: 4 lines in 2 files changed: 3 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/33452.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/33452/head:pull/33452

PR: https://git.openjdk.org/jdk/pull/33452

Reply via email to