Fix path searching for where.exe and request handler parsing (#595)

This commit is contained in:
Justin Kotalik 2018-02-20 08:10:13 -08:00 committed by GitHub
parent fa5e9e7d7b
commit c395db12e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -457,7 +457,7 @@ APPLICATION_INFO::FindNativeAssemblyFromHostfxr(
// Split on semicolons, append aspnetcorerh.dll, and check if the file exists.
while ((intIndex = struNativeSearchPaths.IndexOf(L";", intPrevIndex)) != -1)
{
if (FAILED(hr = struNativeDllLocation.Copy(struNativeSearchPaths.QueryStr(), intIndex - intPrevIndex)))
if (FAILED(hr = struNativeDllLocation.Copy(&struNativeSearchPaths.QueryStr()[intPrevIndex], intIndex - intPrevIndex)))
{
goto Finished;
}

View File

@ -612,11 +612,12 @@ HOSTFXR_UTILITY::FindDotnetExePath(
{
break;
}
if (FAILED(hr = struDotnetSubstring.Copy(struDotnetLocationsString.QueryStr(), index - prevIndex)))
if (FAILED(hr = struDotnetSubstring.Copy(&struDotnetLocationsString.QueryStr()[prevIndex], index - prevIndex)))
{
goto Finished;
}
prevIndex = index + 1;
// \r\n is two wchars, so add 2 here.
prevIndex = index + 2;
if (GetBinaryTypeW(struDotnetSubstring.QueryStr(), &dwBinaryType) &&
fIsCurrentProcess64Bit == (dwBinaryType == SCS_64BIT_BINARY)) {