8157548: JVM crashes sometimes while starting

Behavior of strncmp may be unexpected if char buffers[s] is[are] not null terminated and buffer size is smaller than the length n. Added check to avoid this scenario.

Reviewed-by: dholmes, iklam
1 file changed