Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/binder/assemblybinder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,18 @@ namespace BINDER_SPACE
dwCCFullAssemblyPath,
pwzFullAssemblyPath,
NULL);
if (dwCCFullAssemblyPath > MAX_LONGPATH)
{
fullAssemblyPath.CloseBuffer();
pwzFullAssemblyPath = fullAssemblyPath.OpenUnicodeBuffer(dwCCFullAssemblyPath - 1);
dwCCFullAssemblyPath = WszGetFullPathName(assemblyPath.GetUnicode(),
dwCCFullAssemblyPath,
pwzFullAssemblyPath,
NULL);
}
fullAssemblyPath.CloseBuffer(dwCCFullAssemblyPath);

if ((dwCCFullAssemblyPath == 0) || (dwCCFullAssemblyPath > (MAX_LONGPATH + 1)))
if (dwCCFullAssemblyPath == 0)
{
hr = HRESULT_FROM_GetLastError();
}
Expand Down
6 changes: 0 additions & 6 deletions src/binder/cdebuglog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,6 @@ namespace BINDER_SPACE
PathString szPathString;
DWORD dw = 0;

// _ASSERTE (pszPath ) ;
if (wcslen(pszName) >= MAX_LONGPATH)
{
IF_FAIL_GO(HRESULT_FROM_WIN32(ERROR_BUFFER_OVERFLOW));
}

size_t pszNameLen = wcslen(pszName);
WCHAR * szPath = szPathString.OpenUnicodeBuffer(static_cast<COUNT_T>(pszNameLen));
size_t cbSzPath = (sizeof(WCHAR)) * (pszNameLen + 1); // SString allocates extra byte for null
Expand Down
7 changes: 6 additions & 1 deletion src/coreclr/hosts/corerun/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ else()
)

target_link_libraries(CoreRun
msvcrt.lib
utilcodestaticnohost
advapi32.lib
oleaut32.lib
uuid.lib
user32.lib
msvcrt$<$<OR:$<CONFIG:Debug>,$<CONFIG:Checked>>:d>.lib
)

# Can't compile on linux yet so only add for windows
Expand Down
6 changes: 6 additions & 0 deletions src/coreclr/hosts/corerun/coreRun.nativeproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,16 @@
<IsTestNetHost>true</IsTestNetHost>
</PropertyGroup>

<ItemGroup>
<LinkPreCrtLibs Include="$(ClrLibPath)\utilcodestaticnohost.lib" />
<ProjectReference Include="$(ClrSrcDirectory)utilcode\staticnohost\staticnohost.nativeproj" />
</ItemGroup>
<ItemGroup>
<TargetLib Include="$(CoreSystemCrt)" />
<TargetLib Condition="'$(BuildForWindows7)'=='true'" Include="$(SdkLibPath)\mincore_fw.lib" />
<TargetLib Condition="'$(BuildForWindows7)'!='true'" Include="$(SdkLibPath)\mincore.lib" />
<TargetLib Include="$(SdkLibPath)\oleaut32.lib" />
<TargetLib Include="$(SdkLibPath)\uuid.lib" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading