--- old/src/share/vm/prims/jvm.cpp 2018-07-13 12:03:29.291290740 -0700 +++ new/src/share/vm/prims/jvm.cpp 2018-07-13 12:03:29.168279702 -0700 @@ -2915,10 +2915,11 @@ ATTRIBUTE_PRINTF(3, 0) int jio_vsnprintf(char *str, size_t count, const char *fmt, va_list args) { - // see bug 4399518, 4417214 + // Reject count values that are negative signed values converted to + // unsigned; see bug 4399518, 4417214 if ((intptr_t)count <= 0) return -1; - int result = vsnprintf(str, count, fmt, args); + int result = os::vsnprintf(str, count, fmt, args); // Note: on truncation vsnprintf(3) on Unix returns number of // characters which would have been written had the buffer been large // enough; on Windows, it returns -1. We handle both cases here and