]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/io/ufile.cpp
ICU-64252.0.1.tar.gz
[apple/icu.git] / icuSources / io / ufile.cpp
index 6cbb897555d3c73cc72b04c9bd19273073bc417b..1d8c221cdcbf85026029bf58d31126b89b494bfa 100644 (file)
@@ -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);