DBG: fixed invalid CRT parameters
This commit is contained in:
parent
4c35ed2a8d
commit
11006848c4
|
@ -531,7 +531,7 @@ extern "C" DLL_EXPORT bool _dbg_getregdump(REGDUMP* regdump)
|
|||
Getx87StatusWordFields(& (regdump->x87StatusWordFields), regdump->regcontext.x87fpu.StatusWord);
|
||||
LASTERROR lastError;
|
||||
lastError.code = ThreadGetLastError(ThreadGetId(hActiveThread));
|
||||
strcpy_s(lastError.name, _TRUNCATE, ErrorCodeToName(lastError.code).c_str());
|
||||
strncpy_s(lastError.name, ErrorCodeToName(lastError.code).c_str(), _TRUNCATE);
|
||||
regdump->lastError = lastError;
|
||||
|
||||
return true;
|
||||
|
|
|
@ -111,7 +111,7 @@ bool stackcommentget(duint addr, STACK_COMMENT* comment)
|
|||
char string[MAX_STRING_SIZE] = "";
|
||||
if(DbgGetStringAt(data, string))
|
||||
{
|
||||
strcpy_s(comment->comment, _TRUNCATE, string);
|
||||
strncpy_s(comment->comment, string, _TRUNCATE);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -1301,7 +1301,7 @@ bool valapifromstring(const char* name, duint* value, int* value_size, bool prin
|
|||
}
|
||||
else
|
||||
{
|
||||
strcpy_s(modname, _TRUNCATE, name);
|
||||
strncpy_s(modname, name, _TRUNCATE);
|
||||
modname[apiname - name] = 0;
|
||||
}
|
||||
apiname++;
|
||||
|
|
|
@ -35,7 +35,7 @@ void EditBreakpointDialog::loadFromBp()
|
|||
template<typename T>
|
||||
void copyTruncate(T dest, const QString & src)
|
||||
{
|
||||
strcpy_s(dest, _TRUNCATE, src.toUtf8().constData());
|
||||
strncpy_s(dest, src.toUtf8().constData(), _TRUNCATE);
|
||||
}
|
||||
|
||||
void EditBreakpointDialog::on_editName_textEdited(const QString & arg1)
|
||||
|
|
Loading…
Reference in New Issue