Use strncpy instead of strcpy because again, buffer overflows

This commit is contained in:
Glenn Smith 2018-03-06 01:59:05 -05:00
parent 7769da9434
commit 79c34c68db
92 changed files with 298 additions and 279 deletions

View file

@ -110,7 +110,7 @@ public:
SimpleNetObject()
{
mNetFlags.set(ScopeAlways | Ghostable);
dStrcpy(message, "Hello World!");
dStrcpy(message, "Hello World!", 256);
}
U32 packUpdate(NetConnection *conn, U32 mask, BitStream *stream)
{
@ -125,7 +125,7 @@ public:
void setMessage(const char *msg)
{
setMaskBits(1);
dStrcpy(message, msg);
dStrcpy(message, msg, 256);
}
DECLARE_CONOBJECT(SimpleNetObject);