On Fri, 23 Oct 2020 03:18:27 GMT, Eric Liu 
<github.com+10482586+erik...@openjdk.org> wrote:

> A small improvement to avoid extra string copy.
> 
> [Tests]
> Jtreg hotspot::hotspot_all_no_apps, jdk::jdk_core and langtools::tier1.
> No new failure found.

src/java.base/unix/native/libnet/NetworkInterface.c line 232:

> 230:     // if it is virtual sub interface search with parent first.
> 231:     colonP = strchr(name_utf, ':');
> 232:     size_t limit = colonP != NULL ? (size_t)(colonP - name_utf) : 
> strlen(name_utf);

name_utf is not guaranteed to be null terminated

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

PR: https://git.openjdk.java.net/jdk/pull/821

Reply via email to