Add bounds checks to columns accessors.

Hit a crash in one of these on a rare case, so better to check.
This commit is contained in:
Unknown W. Brackets committed 2013-11-27 23:53:18 -08:00
1 parent aa37461084
commit 32f4a7594a
3 files changed
+18

No files matched your search

+8
View File
@@ -129,6 +129,10 @@ void CtrlThreadList::showMenu(int itemIndex, const POINT &pt)
void CtrlThreadList::GetColumnText(wchar_t* dest, int row, int col)
{
if (row < 0 || row >= (int)threads.size()) {
return;
}
switch (col)
{
case TL_NAME:
@@ -618,6 +622,10 @@ bool CtrlStackTraceView::WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, L
void CtrlStackTraceView::GetColumnText(wchar_t* dest, int row, int col)
{
if (row < 0 || row >= (int)frames.size()) {
return;
}
switch (col)
{
case SF_ENTRY: