RFR: 8328874: Class::forName0 should validate the class name length early [v4]
Guanqiang Han
ghan at openjdk.org
Tue Aug 19 15:28:43 UTC 2025
On Fri, 15 Aug 2025 15:35:52 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Guanqiang Han has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Update Class.java
>>
>> correct length of class name
>
> src/java.base/share/native/libjava/Class.c line 119:
>
>> 117: JNU_ThrowClassNotFoundException(env, msg);
>> 118: return 0;
>> 119: }
>
> I wonder if it's time to hoist these checks so that the checking is in a more discoverable place.
@AlanBateman Thank you for the comments . I've moved the check to the Java side. Please have a look when you have time.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26802#discussion_r2285619954
More information about the core-libs-dev
mailing list