mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-27 18:43:48 +00:00
Use strncat instead of strcat to prevent some buffer overflows
This commit is contained in:
parent
53f35e7fb1
commit
7769da9434
32 changed files with 147 additions and 134 deletions
|
|
@ -1306,7 +1306,7 @@ DefineEngineMethod( TerrainBlock, save, bool, ( const char* fileName),,
|
|||
dStrcpy(filename,fileName);
|
||||
char *ext = dStrrchr(filename, '.');
|
||||
if (!ext || dStricmp(ext, ".ter") != 0)
|
||||
dStrcat(filename, ".ter");
|
||||
dStrcat(filename, ".ter", 256);
|
||||
return static_cast<TerrainBlock*>(object)->save(filename);
|
||||
}
|
||||
|
||||
|
|
@ -1316,7 +1316,7 @@ DefineEngineMethod( TerrainBlock, save, bool, ( const char* fileName),,
|
|||
// dStrcpy(filename,argv[2]);
|
||||
// char *ext = dStrrchr(filename, '.');
|
||||
// if (!ext || dStricmp(ext, ".ter") != 0)
|
||||
// dStrcat(filename, ".ter");
|
||||
// dStrcat(filename, ".ter", 256);
|
||||
// return static_cast<TerrainBlock*>(object)->save(filename);
|
||||
//}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue