diff options
Diffstat (limited to 'src/pal/tests/palsuite/file_io/CreateFileA/test1/CreateFileA.cpp')
-rw-r--r-- | src/pal/tests/palsuite/file_io/CreateFileA/test1/CreateFileA.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pal/tests/palsuite/file_io/CreateFileA/test1/CreateFileA.cpp b/src/pal/tests/palsuite/file_io/CreateFileA/test1/CreateFileA.cpp index a70867a5c8..f98fc5b9c5 100644 --- a/src/pal/tests/palsuite/file_io/CreateFileA/test1/CreateFileA.cpp +++ b/src/pal/tests/palsuite/file_io/CreateFileA/test1/CreateFileA.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; @@ -98,7 +98,7 @@ int __cdecl main(int argc, char *argv[]) // creation disp loop for (l = 0; l < 5; l++) { - sprintf(lpFileName, "test%03d.txt", nCounter); + sprintf_s(lpFileName, _countof(lpFileName), "test%03d.txt", nCounter); hFile = CreateFile(lpFileName, dwDesiredAccess[i], dwShareMode[j], |