RFR: 8328874: Class::forName0 should validate the class name length early [v4]

Guanqiang Han ghan at openjdk.org
Tue Aug 19 15:20:52 UTC 2025


> Validate class name length immediately after GetStringUTFLength() in Class.forName0. This prevents potential issues caused by overly long class names before they reach later code that would reject them, throwing ClassNotFoundException early.

Guanqiang Han has updated the pull request incrementally with one additional commit since the last revision:

  Update Class.java
  
  correct length of class name

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/26802/files
  - new: https://git.openjdk.org/jdk/pull/26802/files/b3237eb1..8eb1d4c7

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=26802&range=03
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26802&range=02-03

  Stats: 16 lines in 1 file changed: 15 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/26802.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/26802/head:pull/26802

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


More information about the core-libs-dev mailing list