We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f774c60 commit 69d1e71Copy full SHA for 69d1e71
src/coreclr/vm/object.cpp
@@ -1484,9 +1484,9 @@ void StackTraceArray::Allocate(size_t size)
1484
}
1485
CONTRACTL_END;
1486
1487
- size_t raw_size = size * sizeof(StackTraceElement) + sizeof(ArrayHeader);
+ S_SIZE_T raw_size = S_SIZE_T(size) * S_SIZE_T(sizeof(StackTraceElement)) + S_SIZE_T(sizeof(ArrayHeader));
1488
1489
- if (!FitsIn<DWORD>(raw_size))
+ if (raw_size.IsOverflow() || !FitsIn<DWORD>(raw_size))
1490
{
1491
EX_THROW(EEMessageException, (kOverflowException, IDS_EE_ARRAY_DIMENSIONS_EXCEEDED));
1492
0 commit comments