Skip to content
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: 3 additions & 3 deletions src/coreclr/debug/daccess/stack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ ClrDataStackWalk::GetContext(
{
T_CONTEXT tmpContext = m_context;
UpdateContextFromRegDisp(&m_regDisp, &tmpContext);
CopyMemory(contextBuf, &tmpContext, contextBufSize);
CopyMemory(contextBuf, &tmpContext, min(contextBufSize, (ULONG32)sizeof(tmpContext)));
status = S_OK;
}
}
Expand Down Expand Up @@ -157,7 +157,7 @@ ClrDataStackWalk::SetContext2(
{
// Copy the context to local state so
// that its lifetime extends beyond this call.
CopyMemory(&m_context, context, contextSize);
CopyMemory(&m_context, context, min(contextSize, (ULONG32)sizeof(m_context)));
m_thread->FillRegDisplay(&m_regDisp, &m_context);
m_frameIter.ResetRegDisp(&m_regDisp, (flags & CLRDATA_STACK_SET_CURRENT_CONTEXT) != 0);
m_stackPrev = (TADDR)GetRegdisplaySP(&m_regDisp);
Expand Down Expand Up @@ -663,7 +663,7 @@ ClrDataFrame::GetContext(

EX_TRY
{
CopyMemory(contextBuf, &m_context, contextBufSize);
CopyMemory(contextBuf, &m_context, min(contextBufSize, (ULONG32)sizeof(m_context)));
status = S_OK;
}
EX_CATCH
Expand Down
Loading