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

@@ -4,7 +4,6 @@ Open Asset Import Library (assimp)
Copyright (c) 2006-2024, assimp team
All rights reserved.
Redistribution and use of this software in source and binary forms,
@@ -74,7 +73,7 @@ aiReturn aiGetMaterialProperty(const aiMaterial *pMat,
aiMaterialProperty *prop = pMat->mProperties[i];
if (prop /* just for safety ... */
&& 0 == strcmp(prop->mKey.data, pKey) && (UINT_MAX == type || prop->mSemantic == type) /* UINT_MAX is a wild-card, but this is undocumented :-) */
&& 0 == strncmp(prop->mKey.data, pKey, strlen(pKey)) && (UINT_MAX == type || prop->mSemantic == type) /* UINT_MAX is a wild-card, but this is undocumented :-) */
&& (UINT_MAX == index || prop->mIndex == index)) {
*pPropOut = pMat->mProperties[i];
return AI_SUCCESS;