DBG+GUI: fixed a crash with escaped section names
This commit is contained in:
parent
9123ed3338
commit
1a7f87d440
|
|
@ -47,7 +47,7 @@ static bool _sectionfromaddr(duint addr, char* section)
|
|||
{
|
||||
if(addr >= cur.addr && addr < cur.addr + (cur.size + (0x1000 - 1) & ~(0x1000 - 1)))
|
||||
{
|
||||
strcpy_s(section, MAX_SECTION_SIZE, cur.name);
|
||||
strncpy_s(section, MAX_SECTION_SIZE * 5, cur.name, _TRUNCATE);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ void CPUInfoBox::disasmSelectionChanged(dsint parVA)
|
|||
QString info;
|
||||
|
||||
// Section
|
||||
char section[MAX_SECTION_SIZE];
|
||||
char section[MAX_SECTION_SIZE * 5];
|
||||
if(DbgFunctions()->SectionFromAddr(parVA, section))
|
||||
info += QString(section) + ":";
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue