DBG: resolved issue #194 (very stupid stack overflow in _dbg_addrinfoget)
This commit is contained in:
parent
6b67cde4d4
commit
388d5a0afe
|
@ -87,12 +87,8 @@ extern "C" DLL_EXPORT bool _dbg_addrinfoget(duint addr, SEGMENTREG segment, ADDR
|
|||
bool retval = false;
|
||||
if(addrinfo->flags & flagmodule) //get module
|
||||
{
|
||||
char module[64] = "";
|
||||
if(modnamefromaddr(addr, module, false) and strlen(module) < MAX_MODULE_SIZE) //get module name
|
||||
{
|
||||
strcpy(addrinfo->module, module);
|
||||
if(modnamefromaddr(addr, addrinfo->module, false)) //get module name
|
||||
retval = true;
|
||||
}
|
||||
}
|
||||
if(addrinfo->flags & flaglabel)
|
||||
{
|
||||
|
|
|
@ -244,9 +244,10 @@ bool modnamefromaddr(uint addr, char* modname, bool extension)
|
|||
const ModulesInfo::iterator found = modinfo.find(Range(addr, addr));
|
||||
if(found == modinfo.end()) //not found
|
||||
return false;
|
||||
strcpy(modname, found->second.name);
|
||||
String mod = found->second.name;
|
||||
if(extension)
|
||||
strcat(modname, found->second.extension); //append extension
|
||||
mod += found->second.extension;
|
||||
strcpy_s(modname, MAX_MODULE_SIZE, mod.c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue