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
bf408235a8
commit
1728fe39ad
32 changed files with 147 additions and 134 deletions
|
|
@ -219,8 +219,8 @@ bool GuiFormCtrl::resize(const Point2I &newPosition, const Point2I &newExtent)
|
|||
for(S32 i=strlen; i>=0; --i)
|
||||
{
|
||||
dStrcpy(buf, "");
|
||||
dStrncat(buf, (const char*)mCaption, i);
|
||||
dStrcat(buf, "...");
|
||||
dStrcat(buf, (const char*)mCaption, i);
|
||||
dStrcat(buf, "...", i);
|
||||
|
||||
textWidth = mProfile->mFont->getStrWidth(buf);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue