Skip to content
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

Implement fix in DNMD for https://github.com/dotnet/runtime/pull/108907 #56

Merged
merged 2 commits into from
Oct 16, 2024
Merged
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
6 changes: 4 additions & 2 deletions src/interfaces/importhelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,13 +602,15 @@ namespace
uint32_t publicKeyLength;
if (1 != md_get_column_value_as_blob(sourceAssembly, mdtAssembly_PublicKey, 1, &publicKey, &publicKeyLength))
return E_FAIL;


span<const uint8_t> publicKeyTokenSpan;
StrongNameToken publicKeyToken;
if (publicKey != nullptr)
{
assert(IsAfPublicKey(flags));
flags &= ~afPublicKey;
RETURN_IF_FAILED(StrongNameTokenFromPublicKey({ publicKey, publicKeyLength }, publicKeyToken));
publicKeyTokenSpan = { publicKeyToken.data(), publicKeyToken.size() };
}
else
{
Expand Down Expand Up @@ -648,7 +650,7 @@ namespace
flags,
assemblyName,
assemblyCulture,
{ publicKeyToken.data(), publicKeyToken.size() },
publicKeyTokenSpan,
targetAssembly));

if (hr == S_OK)
Expand Down
Loading