RFR: 8255566: Add size validation when parsing values from VersionProps

David Holmes david.holmes at oracle.com
Tue May 4 07:35:10 UTC 2021


On 4/05/2021 4:18 pm, Robbin Ehn wrote:
> On Tue, 4 May 2021 00:38:54 GMT, David Holmes <dholmes at openjdk.org> wrote:
> 
>> 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
> 
> Looks good.

Thanks Robbin!

David

> -------------
> 
> Marked as reviewed by rehn (Reviewer).
> 
> PR: https://git.openjdk.java.net/jdk/pull/3848
> 


More information about the hotspot-runtime-dev mailing list