mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 14:44:36 +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
|
|
@ -195,7 +195,7 @@ DefineEngineMethod( GuiDirectoryFileListCtrl, getSelectedFiles, const char*, (),
|
|||
|
||||
dMemset( itemBuffer, 0, itemBufSize );
|
||||
dSprintf( itemBuffer, itemBufSize, " %s", itemText );
|
||||
dStrcat( returnBuffer, itemBuffer );
|
||||
dStrcat( returnBuffer, itemBuffer, itemBufSize );
|
||||
}
|
||||
|
||||
return returnBuffer;
|
||||
|
|
|
|||
|
|
@ -458,7 +458,7 @@ DefineEngineMethod( GuiListBoxCtrl, getSelectedItems, const char*, (),,
|
|||
{
|
||||
UTF8 retFormat[12];
|
||||
dSprintf( retFormat, 12, "%d ", (*i) );
|
||||
dStrcat( retBuffer, retFormat );
|
||||
dStrcat( retBuffer, retFormat, 12 );
|
||||
}
|
||||
|
||||
return retBuffer;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue