diff options
author | dotnet-bot <dotnet-bot@microsoft.com> | 2016-02-01 10:48:17 -0800 |
---|---|---|
committer | dotnet-bot <dotnet-bot@microsoft.com> | 2016-02-01 10:48:17 -0800 |
commit | a2cfe7239352d1934037965522fe5dd695873a3e (patch) | |
tree | e6ba19fd9a6df1b70dc766ff69b34b860e064001 /src/tools | |
parent | 332bbcdc6226f7d8d63e49fa53d30e1a53839f7f (diff) | |
download | coreclr-a2cfe7239352d1934037965522fe5dd695873a3e.tar.gz coreclr-a2cfe7239352d1934037965522fe5dd695873a3e.tar.bz2 coreclr-a2cfe7239352d1934037965522fe5dd695873a3e.zip |
Fix OACR errors for ProjectK
[tfs-changeset: 1570939]
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/crossgen/crossgen.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/tools/crossgen/crossgen.cpp b/src/tools/crossgen/crossgen.cpp index 8ada40e555..53e5aa133b 100644 --- a/src/tools/crossgen/crossgen.cpp +++ b/src/tools/crossgen/crossgen.cpp @@ -282,11 +282,12 @@ bool StringEndsWith(LPCWSTR pwzString, LPCWSTR pwzCandidate) // When using the Phone binding model (TrustedPlatformAssemblies), automatically // detect which path mscorlib.[ni.]dll lies in. // -bool ComputeMscorlibPathFromTrustedPlatformAssemblies(LPWSTR pwzMscorlibPath, DWORD cbMscorlibPath, LPCWSTR pwzTrustedPlatformAssemblies) +bool ComputeMscorlibPathFromTrustedPlatformAssemblies(_In_z_ LPWSTR pwzMscorlibPath, DWORD cbMscorlibPath, LPCWSTR pwzTrustedPlatformAssemblies) { LPWSTR wszTrustedPathCopy = new WCHAR[wcslen(pwzTrustedPlatformAssemblies) + 1]; wcscpy_s(wszTrustedPathCopy, wcslen(pwzTrustedPlatformAssemblies) + 1, pwzTrustedPlatformAssemblies); - LPWSTR wszSingleTrustedPath = wcstok(wszTrustedPathCopy, PATH_SEPARATOR_STR_W); + wchar_t *context; + LPWSTR wszSingleTrustedPath = wcstok_s(wszTrustedPathCopy, PATH_SEPARATOR_STR_W, &context); while (wszSingleTrustedPath != NULL) { @@ -315,7 +316,7 @@ bool ComputeMscorlibPathFromTrustedPlatformAssemblies(LPWSTR pwzMscorlibPath, DW return true; } - wszSingleTrustedPath = wcstok(NULL, PATH_SEPARATOR_STR_W); + wszSingleTrustedPath = wcstok_s(NULL, PATH_SEPARATOR_STR_W, &context); } delete [] wszTrustedPathCopy; |