mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33: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
|
|
@ -2176,8 +2176,8 @@ bool expandPath(char* pDstPath, U32 size, const char* pSrcPath, const char* pWor
|
|||
}
|
||||
|
||||
// Format the output path.
|
||||
dStrncat(pathBuffer, "/", sizeof(pathBuffer) - 1 - strlen(pathBuffer));
|
||||
dStrncat(pathBuffer, pSrc, sizeof(pathBuffer) - 1 - strlen(pathBuffer));
|
||||
dStrcat(pathBuffer, "/", sizeof(pathBuffer) - 1 - strlen(pathBuffer));
|
||||
dStrcat(pathBuffer, pSrc, sizeof(pathBuffer) - 1 - strlen(pathBuffer));
|
||||
|
||||
// Are we ensuring the trailing slash?
|
||||
if (ensureTrailingSlash)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue