[SETUPLIB][USETUP] Use NT RTL String Safe functions instead of Win32-oriented ones...
[reactos.git] / base / setup / lib / mui.c
index 1e7eb9d..27b85b4 100644 (file)
@@ -298,10 +298,10 @@ AddKbLayoutsToRegistry(
     {
         if (uIndex > 19) break;
 
-        swprintf(szValueName, L"%u", uIndex + 1);
+        RtlStringCchPrintfW(szValueName, ARRAYSIZE(szValueName), L"%u", uIndex + 1);
         RtlInitUnicodeString(&ValueName, szValueName);
 
-        swprintf(szLangID, L"0000%s", MuiLayouts[uIndex].LangID);
+        RtlStringCchPrintfW(szLangID, ARRAYSIZE(szLangID), L"0000%s", MuiLayouts[uIndex].LangID);
 
         if (_wcsicmp(szLangID, MuiLayouts[uIndex].LayoutID) == 0)
         {
@@ -321,7 +321,7 @@ AddKbLayoutsToRegistry(
         }
         else
         {
-            swprintf(szLangID, L"d%03lu%s", uCount, MuiLayouts[uIndex].LangID);
+            RtlStringCchPrintfW(szLangID, ARRAYSIZE(szLangID), L"d%03lu%s", uCount, MuiLayouts[uIndex].LangID);
             Status = NtSetValueKey(KeyHandle,
                                    &ValueName,
                                    0,