mirror of
https://github.com/leozide/leocad.git
synced 2026-07-27 19:56:49 +00:00
Added bounds check to strcat.
This commit is contained in:
+2
-1
@@ -15,6 +15,7 @@
|
||||
#include "lc_qutils.h"
|
||||
#include "lc_synth.h"
|
||||
#include "lc_traintrack.h"
|
||||
#include "lc_string.h"
|
||||
|
||||
constexpr float LC_PIECE_CONTROL_POINT_SIZE = 10.0f;
|
||||
|
||||
@@ -336,7 +337,7 @@ bool lcPiece::FileLoad(lcFile& file)
|
||||
}
|
||||
else
|
||||
file.ReadBuffer(name, LC_PIECE_NAME_LEN);
|
||||
strcat(name, ".dat");
|
||||
lcstrcat(name, ".dat");
|
||||
|
||||
PieceInfo* pInfo = lcGetPiecesLibrary()->FindPiece(name, nullptr, true, false);
|
||||
SetPieceInfo(pInfo, QString(), true, true);
|
||||
|
||||
Reference in New Issue
Block a user