RFR: JDK-8347377 : Add validation checks for ICC_Profile header fields [v3]

Harshitha Onkar honkar at openjdk.org
Wed Jan 15 23:52:40 UTC 2025


On Tue, 14 Jan 2025 17:59:26 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

>> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   indentation
>
> test/jdk/java/awt/color/ICC_Profile/ValidateICCHeaderData.java line 39:
> 
>> 37: 
>> 38: public class ValidateICCHeaderData {
>> 39:     private static ICC_Profile profile;
> 
> the change will also affect serialization, the test should check that code path.

Added 2 more cases that tests loading a profile using ICC_Profile.getInstance(byte[] data)
Now we hit the code path where verifyHeader() is called within getInstance(). 
Also , I did test by directly loading a profile from a file - ICC_Profile.getInstance("sRGB.pf") and it works fine.

Do you mean this code path or something else?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23044#discussion_r1917483386


More information about the client-libs-dev mailing list