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

Sergey Bylokhov serb at openjdk.org
Mon Jan 13 19:22:48 UTC 2025


On Mon, 13 Jan 2025 19:10:00 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
>
> src/java.desktop/share/classes/java/awt/color/ICC_Profile.java line 795:
> 
>> 793:         }
>> 794: 
>> 795:         if (p != null) {
> 
> If it possible to get null here we should thrown an exception, but I think we thrown that exception already in the native.

it is probably better to add this validation into ProfileDataVerifier.verify(data), and check it even before .getModule().loadProfile(data)

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

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


More information about the client-libs-dev mailing list