mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Use strncpy instead of strcpy because again, buffer overflows
This commit is contained in:
parent
7769da9434
commit
79c34c68db
92 changed files with 298 additions and 279 deletions
|
|
@ -128,7 +128,7 @@
|
|||
const char *rmtCommandName = dStrchr(mArgv[1], ' ') + 1;
|
||||
if(conn->isConnectionToServer())
|
||||
{
|
||||
dStrcpy(mBuf, "clientCmd");
|
||||
dStrcpy(mBuf, "clientCmd", 1024);
|
||||
dStrcat(mBuf, rmtCommandName, 1024);
|
||||
|
||||
char *temp = mArgv[1];
|
||||
|
|
@ -139,7 +139,7 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
dStrcpy(mBuf, "serverCmd");
|
||||
dStrcpy(mBuf, "serverCmd", 1024);
|
||||
dStrcat(mBuf, rmtCommandName, 1024);
|
||||
char *temp = mArgv[1];
|
||||
|
||||
|
|
@ -409,7 +409,7 @@ ConsoleFunction( buildTaggedString, const char*, 2, 11, "(string format, ...)"
|
|||
S32 strLength = dStrlen(argStr);
|
||||
if (strLength > strMaxLength)
|
||||
goto done;
|
||||
dStrcpy(strBufPtr, argStr);
|
||||
dStrcpy(strBufPtr, argStr, strMaxLength);
|
||||
strBufPtr += strLength;
|
||||
strMaxLength -= strLength;
|
||||
fmtStrPtr += 2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue