8244767: Potential non-terminated string in getEncodingInternal() on Windows

Reviewed-by: bpb, naoto
This commit is contained in:
Johannes Kuhn 2020-05-12 11:20:34 -07:00 committed by Brent Christian
parent be6f74718e
commit 06d6234213

View File

@ -73,6 +73,7 @@ getEncodingInternal(LCID lcid)
LOCALE_IDEFAULTANSICODEPAGE, LOCALE_IDEFAULTANSICODEPAGE,
ret+2, 14) == 0) { ret+2, 14) == 0) {
codepage = 1252; codepage = 1252;
strcpy(ret+2, "1252");
} else { } else {
codepage = atoi(ret+2); codepage = atoi(ret+2);
} }