Engine was also using raw strcat/strcpy

This commit is contained in:
Glenn Smith 2018-03-07 00:49:46 -05:00
parent e6e97e660c
commit dce7f5f6b3
4 changed files with 6 additions and 6 deletions

View file

@ -182,8 +182,8 @@ extern "C" {
void torque_setexecutablepath(const char* directory)
{
gExecutablePath = new char[strlen(directory)+1];
strcpy(gExecutablePath, directory);
gExecutablePath = new char[dStrlen(directory)+1];
dStrcpy(gExecutablePath, directory, dStrlen(directory)+1);
}
// set Torque 3D into web deployment mode (disable fullscreen exlusive mode, etc)

View file

@ -33,7 +33,7 @@ bool fsTiXmlDocument::LoadFile( const char * pFilename, TiXmlEncoding encoding )
#ifdef TORQUE_OS_ANDROID
if (strlen(pFilename) > strlen(filenameBuffer)) {
strcpy(filenameBuffer, pFilename);
dStrcpy(filenameBuffer, pFilename, 1024);
}
#endif

View file

@ -53,7 +53,7 @@ bool TamlXmlParser::accept( const char* pFilename, TamlVisitor& visitor )
#ifdef TORQUE_OS_ANDROID
if (strlen(pFilename) > strlen(filenameBuffer)) {
strcpy(filenameBuffer, pFilename);
dStrcpy(filenameBuffer, pFilename, 1024);
}
#endif

View file

@ -523,7 +523,7 @@ next:
tblPkgID[j] = apicID & PackageIDMask;
sprintf(tmp," AffinityMask = %d; Initial APIC = %d; Physical ID = %d, Core ID = %d, SMT ID = %d\n",
dwAffinityMask, apicID, tblPkgID[j], tblCoreID[j], tblSMTID[j]);
strcat(g_s3Levels, tmp);
dStrcat(g_s3Levels, tmp, 2048);
numLPEnabled ++; // Number of available logical processors in the system.
@ -654,4 +654,4 @@ next:
} // namespace CPUInfo
#endif
#endif
#endif