Remove strcpy. (#5802)

* Remove strcpy.

* Sonarcube: Add more strcpy replacements

* BlenderLoader: Replace strncpy by memcpy
This commit is contained in:
Kim Kulling
2024-11-18 16:54:58 +01:00
committed by GitHub
parent f5fb8ff842
commit 41cc2f66a4
8 changed files with 20 additions and 29 deletions

View File

@@ -455,11 +455,10 @@ void SMDImporter::CreateOutputNodes() {
delete pcOldRoot;
pScene->mRootNode->mParent = nullptr;
}
else
{
::strcpy(pScene->mRootNode->mName.data, "<SMD_root>");
} else {
static constexpr char rootName[11] = "<SMD_root>";
pScene->mRootNode->mName.length = 10;
::strncpy(pScene->mRootNode->mName.data, rootName, pScene->mRootNode->mName.length);
}
}