Replaced strcpy with a safe function.

This commit is contained in:
Leonardo Zide
2025-12-07 16:48:07 -08:00
parent 6b7f9faad1
commit 2da8a27095
14 changed files with 74 additions and 49 deletions
+2 -2
View File
@@ -1,7 +1,6 @@
#include "lc_global.h"
#include "lc_math.h"
#include "lc_mesh.h"
#include <locale.h>
#include "pieceinf.h"
#include "camera.h"
#include "project.h"
@@ -18,6 +17,7 @@
#include "lc_qimagedialog.h"
#include "lc_modellistdialog.h"
#include "lc_bricklink.h"
#include "lc_string.h"
lcHTMLExportOptions::lcHTMLExportOptions(const Project* Project)
{
@@ -2413,7 +2413,7 @@ std::pair<bool, QString> Project::ExportPOVRay(const QString& FileName)
if (!ModelPart.Mesh)
{
std::pair<char[LC_PIECE_NAME_LEN + 1], int>& Entry = PieceTable[ModelPart.Info];
strcpy(Entry.first, "lc_");
lcstrcpy(Entry.first, "lc_");
strncat(Entry.first, Name, sizeof(Entry.first) - 1);
Entry.first[sizeof(Entry.first) - 1] = 0;
}