DBG: fix some truncation issues
This commit is contained in:
parent
058c14d8bf
commit
995153cfc0
|
|
@ -290,8 +290,8 @@ static bool _gethandlename(duint handle, char* name, size_t nameSize, char* type
|
|||
String typeNameS;
|
||||
if(!HandlesGetName(fdProcessInfo->hProcess, HANDLE(handle), nameS, typeNameS))
|
||||
return false;
|
||||
strcpy_s(name, nameSize, nameS.c_str());
|
||||
strcpy_s(typeName, typeNameSize, typeNameS.c_str());
|
||||
strncpy_s(name, nameSize, nameS.c_str(), _TRUNCATE);
|
||||
strncpy_s(typeName, typeNameSize, typeNameS.c_str(), _TRUNCATE);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ static bool getLabel(duint addr, char* label, bool noFuncOffset)
|
|||
//auto name = demanglePE32ExternCFunc(symInfo.decoratedName.c_str());
|
||||
if(!bUndecorateSymbolNames || !SafeUnDecorateSymbolName(symInfo.decoratedName.c_str(), label, MAX_LABEL_SIZE, UNDNAME_NAME_ONLY))
|
||||
{
|
||||
strcpy_s(label, MAX_LABEL_SIZE, symInfo.decoratedName.c_str());
|
||||
strncpy_s(label, MAX_LABEL_SIZE, symInfo.decoratedName.c_str(), _TRUNCATE);
|
||||
}
|
||||
retval = !shouldFilterSymbol(label);
|
||||
if(retval && displacement)
|
||||
|
|
|
|||
|
|
@ -327,7 +327,7 @@ bool SymGetSourceLine(duint Cip, char* FileName, int* Line, DWORD* disp)
|
|||
*Line = lineInfo.lineNumber;
|
||||
|
||||
if(FileName)
|
||||
strcpy_s(FileName, MAX_STRING_SIZE, lineInfo.sourceFile.c_str());
|
||||
strncpy_s(FileName, MAX_STRING_SIZE, lineInfo.sourceFile.c_str(), _TRUNCATE);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue