Use strncat instead of strcat to prevent some buffer overflows

This commit is contained in:
Glenn Smith 2018-03-06 00:48:44 -05:00
parent 53f35e7fb1
commit 7769da9434
32 changed files with 147 additions and 134 deletions

View file

@ -129,7 +129,7 @@
if(conn->isConnectionToServer())
{
dStrcpy(mBuf, "clientCmd");
dStrcat(mBuf, rmtCommandName);
dStrcat(mBuf, rmtCommandName, 1024);
char *temp = mArgv[1];
mArgv[1] = mBuf;
@ -140,7 +140,7 @@
else
{
dStrcpy(mBuf, "serverCmd");
dStrcat(mBuf, rmtCommandName);
dStrcat(mBuf, rmtCommandName, 1024);
char *temp = mArgv[1];
dSprintf(idBuf, sizeof(idBuf), "%d", conn->getId());