X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/f3c0d7a59d99c2a94c6b8822291f0e42be3773c9..c5116b9f5a666b9d59f443b3770acd6ef64dc6c3:/icuSources/io/ufile.cpp?ds=inline diff --git a/icuSources/io/ufile.cpp b/icuSources/io/ufile.cpp index 6cbb8975..1d8c221c 100644 --- a/icuSources/io/ufile.cpp +++ b/icuSources/io/ufile.cpp @@ -160,7 +160,7 @@ u_fopen_u(const UChar *filename, // TODO: test this code path, including wperm. wchar_t wperm[40] = {}; size_t retVal; - mbstowcs_s(&retVal, wperm, perm, _TRUNCATE); + mbstowcs_s(&retVal, wperm, UPRV_LENGTHOF(wperm), perm, _TRUNCATE); FILE *systemFile = _wfopen((const wchar_t *)filename, wperm); if (systemFile) { result = finit_owner(systemFile, locale, codepage, TRUE);