mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 19:53:48 +00:00
Use strncat instead of strcat to prevent some buffer overflows
This commit is contained in:
parent
bf408235a8
commit
1728fe39ad
32 changed files with 147 additions and 134 deletions
|
|
@ -661,28 +661,28 @@ DefineConsoleMethod( Material, getAnimFlags, const char*, (U32 id), , "" )
|
|||
if(dStrcmp( animFlags, "" ) == 0)
|
||||
dStrcpy( animFlags, "$Rotate" );
|
||||
else
|
||||
dStrcat( animFlags, " | $Rotate");
|
||||
dStrcat( animFlags, " | $Rotate", 512);
|
||||
}
|
||||
if(object->mAnimFlags[ id ] & Material::Wave)
|
||||
{
|
||||
if(dStrcmp( animFlags, "" ) == 0)
|
||||
dStrcpy( animFlags, "$Wave" );
|
||||
else
|
||||
dStrcat( animFlags, " | $Wave");
|
||||
dStrcat( animFlags, " | $Wave", 512);
|
||||
}
|
||||
if(object->mAnimFlags[ id ] & Material::Scale)
|
||||
{
|
||||
if(dStrcmp( animFlags, "" ) == 0)
|
||||
dStrcpy( animFlags, "$Scale" );
|
||||
else
|
||||
dStrcat( animFlags, " | $Scale");
|
||||
dStrcat( animFlags, " | $Scale", 512);
|
||||
}
|
||||
if(object->mAnimFlags[ id ] & Material::Sequence)
|
||||
{
|
||||
if(dStrcmp( animFlags, "" ) == 0)
|
||||
dStrcpy( animFlags, "$Sequence" );
|
||||
else
|
||||
dStrcat( animFlags, " | $Sequence");
|
||||
dStrcat( animFlags, " | $Sequence", 512);
|
||||
}
|
||||
|
||||
return animFlags;
|
||||
|
|
@ -718,4 +718,4 @@ bool Material::_setAccuEnabled( void *object, const char *index, const char *dat
|
|||
AccumulationVolume::refreshVolumes();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue