summaryrefslogtreecommitdiff
path: root/src/pal/tests/palsuite/file_io/CreateFileW/test1/CreateFileW.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pal/tests/palsuite/file_io/CreateFileW/test1/CreateFileW.cpp')
-rw-r--r--src/pal/tests/palsuite/file_io/CreateFileW/test1/CreateFileW.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pal/tests/palsuite/file_io/CreateFileW/test1/CreateFileW.cpp b/src/pal/tests/palsuite/file_io/CreateFileW/test1/CreateFileW.cpp
index 4d7d20af29..0619f5b4aa 100644
--- a/src/pal/tests/palsuite/file_io/CreateFileW/test1/CreateFileW.cpp
+++ b/src/pal/tests/palsuite/file_io/CreateFileW/test1/CreateFileW.cpp
@@ -21,7 +21,7 @@ BOOL Cleanup(void)
// loop through all accesses, modes, dispositions and flags
for (i=0; i<4*8*4*5; ++i) {
- sprintf(FileName, "test%03d.txt", i);
+ sprintf_s(FileName, _countof(FileName), "test%03d.txt", i);
if (DeleteFileA(FileName) == FALSE) {
if (GetLastError() != ERROR_FILE_NOT_FOUND) {
bRet = FALSE;
@@ -99,7 +99,7 @@ int __cdecl main(int argc, char *argv[])
// creation disp loop
for (l = 0; l < 5; l++)
{
- sprintf(string, "test%03d.txt", nCounter);
+ sprintf_s(string, _countof(string), "test%03d.txt", nCounter);
lpFileName = convert(string);
hFile = CreateFileW(lpFileName,
dwDesiredAccess[i],