Skip to content

[NO MERGE] Testing #62130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ BOOL HostFxrResolver::IsX64(const WCHAR* dotnetPath)
}

// Read the DOS header
IMAGE_DOS_HEADER dosHeader{};
IMAGE_DOS_HEADER dosHeader;
file.read(reinterpret_cast<char*>(&dosHeader), sizeof(dosHeader));
if (dosHeader.e_magic != IMAGE_DOS_SIGNATURE) // 'MZ'
{
Expand All @@ -555,7 +555,7 @@ BOOL HostFxrResolver::IsX64(const WCHAR* dotnetPath)
file.seekg(dosHeader.e_lfanew, std::ios::beg);

// Read the PE header
DWORD peSignature{};
DWORD peSignature;
file.read(reinterpret_cast<char*>(&peSignature), sizeof(peSignature));
if (peSignature != IMAGE_NT_SIGNATURE) // 'PE\0\0'
{
Expand All @@ -564,11 +564,11 @@ BOOL HostFxrResolver::IsX64(const WCHAR* dotnetPath)
}

// Read the file header
IMAGE_FILE_HEADER fileHeader{};
IMAGE_FILE_HEADER fileHeader;
file.read(reinterpret_cast<char*>(&fileHeader), sizeof(fileHeader));

// Read the optional header magic field
WORD magic{};
WORD magic;
file.read(reinterpret_cast<char*>(&magic), sizeof(magic));

// Determine the architecture based on the magic value
Expand Down
Loading