RFR: 8255566: Add size validation when parsing values from VersionProps
David Holmes
dholmes at openjdk.java.net
Tue May 4 00:48:07 UTC 2021
java.lang.VersionProps defines a number of JDK version properties that are read by the VM and stored in JDK_Version or VM_Version. These values are read into fixed size buffers with no guarantee that the value will actually fit. The proposed solution is to get rid of the fixed size buffers, allocate initially into the thread's resource area then make a permanent copy using os::strdup.
Testing: tiers 1-3
Thanks,
David
-------------
Commit messages:
- Add missing include
- 8255566: Add size validation when parsing values from VersionProps
Changes: https://git.openjdk.java.net/jdk/pull/3848/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=3848&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8255566
Stats: 38 lines in 2 files changed: 6 ins; 15 del; 17 mod
Patch: https://git.openjdk.java.net/jdk/pull/3848.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/3848/head:pull/3848
PR: https://git.openjdk.java.net/jdk/pull/3848
More information about the hotspot-runtime-dev
mailing list