mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
Engine was also using raw strcat/strcpy
This commit is contained in:
parent
e6e97e660c
commit
dce7f5f6b3
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue