> ICC_Profile.setData(..) does validation of the specified tag contents and > throws an exception if it is not valid. But if the tag represents the header, > at least some of the validation is lazy, occurring only when the data is > used, leading to unexpected exceptions at a later time. The check should be > done up-front when the data is set, as in other cases. > > `verifyHeader(byte[] data)`is called when header data is being updated and > the following fields are validated according to the ICC Spec Document. [[1] > Pg#19](https://www.color.org/specification/ICC.1-2022-05.pdf). > > - Profile/Device class > - Color Space > - Rendering Intent > - PCS > - Header Size check (ICC Header Size = 128 bytes) > > These validation checks are added to ICC_Profile.getInstance(..) & > ICC_Profile.setData(..) methods. > > Reference: [1] https://www.color.org/specification/ICC.1-2022-05.pdf
Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: updated test summary, jtreg tag ------------- Changes: - all: https://git.openjdk.org/jdk/pull/23044/files - new: https://git.openjdk.org/jdk/pull/23044/files/b31900bc..78500c2a Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=23044&range=07 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=23044&range=06-07 Stats: 25 lines in 1 file changed: 10 ins; 10 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/23044.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/23044/head:pull/23044 PR: https://git.openjdk.org/jdk/pull/23044
