RFR 8167546: enhance os::file_name_strncmp() on Mac OSX (original) (raw)

Roger Riggs Roger.Riggs at oracle.com
Tue Oct 9 17:11:00 UTC 2018


Hi Gerard,

You should probably check the return values from realpath. The contents of the buffer is undefined if it fails and doesn't guarantee that nothing has been written to the buffer.

Also, strncpy doesn't guarantee to null terminate the copied string if it is as long as the buffer. So the strcmp (line 53) could compare off the end of the buffer.

$.02, Roger

Thanks, Roger



More information about the hotspot-runtime-dev mailing list