diff options
author | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2021-03-17 16:35:31 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-17 16:35:31 +0300 |
commit | ade51040b054a2f97fe795ef89ca1d59756e6ccb (patch) | |
tree | 7f8a56f609ae48eb12acbc43d1b481acc78e8163 /src/coreclr/md | |
parent | ac5c33defa6a9983e85ce8bf0be352cb09f5b8eb (diff) |
Big-endian fixes for ilasm/ildasm (#49685)
* Add byte swap when accessing PublicKeyBlob in AsmMan::EndAssembly
* Fix access beyond end of pszString in DumpUnicodeString
* Remove unneccessary assert in _FillMDDefaultValue
Diffstat (limited to 'src/coreclr/md')
-rw-r--r-- | src/coreclr/md/runtime/mdinternalro.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/coreclr/md/runtime/mdinternalro.cpp b/src/coreclr/md/runtime/mdinternalro.cpp index 327eb8648a7..7f8005a1faf 100644 --- a/src/coreclr/md/runtime/mdinternalro.cpp +++ b/src/coreclr/md/runtime/mdinternalro.cpp @@ -3323,9 +3323,8 @@ HRESULT _FillMDDefaultValue( #if BIGENDIAN { // We need to allocate and swap the string if we're on a big endian + // This allocation will be freed by the MDDefaultValue destructor. pMDDefaultValue->m_wzValue = new WCHAR[(cbValue + 1) / sizeof (WCHAR)]; - _ASSERTE(FALSE); // Nothing ever free's this newly allocated array. Inserting assert so that if we ever actually - // use this code path, we'll fix it then. (Don't want to fix something I can't test.) IfNullGo(pMDDefaultValue->m_wzValue); memcpy(const_cast<WCHAR *>(pMDDefaultValue->m_wzValue), pValue, cbValue); _ASSERTE(cbValue % sizeof(WCHAR) == 0); |