From: Steve MacLean Date: Fri, 11 Jun 2021 21:49:49 +0000 (-0400) Subject: Fix 54025 (#54070) X-Git-Tag: submit/tizen/20210909.063632~809 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b2fe6678282503374aeea7ab5f468f7a3cc85a2f;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Fix 54025 (#54070) --- diff --git a/src/coreclr/debug/ee/controller.cpp b/src/coreclr/debug/ee/controller.cpp index 7f7fb10..01aedf5 100644 --- a/src/coreclr/debug/ee/controller.cpp +++ b/src/coreclr/debug/ee/controller.cpp @@ -4409,8 +4409,9 @@ DebuggerPatchSkip::DebuggerPatchSkip(Thread *thread, } else { + _ASSERTE(m_instrAttrib.m_cOperandSize <= SharedPatchBypassBuffer::cbBufferBypass); // Copy the data into our buffer. - memcpy(bufferBypass, patch->address + m_instrAttrib.m_cbInstr + dwOldDisp, SharedPatchBypassBuffer::cbBufferBypass); + memcpy(bufferBypass, patch->address + m_instrAttrib.m_cbInstr + dwOldDisp, m_instrAttrib.m_cOperandSize); if (m_instrAttrib.m_fIsWrite) { diff --git a/src/coreclr/debug/ee/controller.h b/src/coreclr/debug/ee/controller.h index 9bcfc86..9fe0a67 100644 --- a/src/coreclr/debug/ee/controller.h +++ b/src/coreclr/debug/ee/controller.h @@ -288,7 +288,7 @@ public: // "PatchBypass" must be the first field of this class for alignment to be correct. BYTE PatchBypass[MAX_INSTRUCTION_LENGTH]; #if defined(TARGET_AMD64) - const static int cbBufferBypass = 0x10; + const static int cbBufferBypass = 0x20; BYTE BypassBuffer[cbBufferBypass]; UINT_PTR RipTargetFixup;