On Tue, 9 Jun 2026 07:32:15 GMT, Johan Sjölen <[email protected]> wrote:

>> Coleen Phillimore has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Apply suggestions from code review
>>   
>>   Co-authored-by: David Holmes 
>> <[email protected]>
>
> src/hotspot/os/posix/perfMemory_posix.cpp line 140:
> 
>> 138: static char* get_user_tmp_dir(const char* user, int vmid, int nspid) {
>> 139:   char* tmpdir = (char *)os::get_temp_directory();
>> 140:   char buffer[PATH_MAX] = {0};
> 
>> The functions snprintf() and vsnprintf() write at most size bytes (including 
>> the terminating null byte ('\0')) to str. 
> 
> So this can store a path that's 1 less byte than the actual `PATH_MAX`.

Yes.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31407#discussion_r3388078958

Reply via email to