diff options
author | Jan Vorlicek <janvorli@microsoft.com> | 2016-12-09 00:51:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-09 00:51:19 +0100 |
commit | e58e3c5e0a527802bd5286c537dc3ed603317c1d (patch) | |
tree | dabb0caf55c65bfe141a91de2c64a4c22a3682c5 /src/pal/tests/palsuite/file_io/CreateFileW/test1 | |
parent | bf4ed11eb5cee7123fd0c6fa5b60f09fe7adf23e (diff) | |
download | coreclr-e58e3c5e0a527802bd5286c537dc3ed603317c1d.tar.gz coreclr-e58e3c5e0a527802bd5286c537dc3ed603317c1d.tar.bz2 coreclr-e58e3c5e0a527802bd5286c537dc3ed603317c1d.zip |
Remove sscanf and sprintf usage (#8508)
* Remove sscanf
* Remove sprintf
Diffstat (limited to 'src/pal/tests/palsuite/file_io/CreateFileW/test1')
-rw-r--r-- | src/pal/tests/palsuite/file_io/CreateFileW/test1/CreateFileW.cpp | 4 |
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], |