mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-13 09:39:33 +01:00
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:
1 parent
aa37461084
commit
32f4a7594a
3 files changed
+18
No files matched your search
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user