Skip to content

Commit b2fe667

Browse files
authored
Fix 54025 (#54070)
1 parent 68dec6a commit b2fe667

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/coreclr/debug/ee/controller.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4409,8 +4409,9 @@ DebuggerPatchSkip::DebuggerPatchSkip(Thread *thread,
44094409
}
44104410
else
44114411
{
4412+
_ASSERTE(m_instrAttrib.m_cOperandSize <= SharedPatchBypassBuffer::cbBufferBypass);
44124413
// Copy the data into our buffer.
4413-
memcpy(bufferBypass, patch->address + m_instrAttrib.m_cbInstr + dwOldDisp, SharedPatchBypassBuffer::cbBufferBypass);
4414+
memcpy(bufferBypass, patch->address + m_instrAttrib.m_cbInstr + dwOldDisp, m_instrAttrib.m_cOperandSize);
44144415

44154416
if (m_instrAttrib.m_fIsWrite)
44164417
{

src/coreclr/debug/ee/controller.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ class SharedPatchBypassBuffer
288288
// "PatchBypass" must be the first field of this class for alignment to be correct.
289289
BYTE PatchBypass[MAX_INSTRUCTION_LENGTH];
290290
#if defined(TARGET_AMD64)
291-
const static int cbBufferBypass = 0x10;
291+
const static int cbBufferBypass = 0x20;
292292
BYTE BypassBuffer[cbBufferBypass];
293293

294294
UINT_PTR RipTargetFixup;

0 commit comments

Comments
 (0)