122143,122139 Copy into fixed size buffer

pull/1007/head
wise86Android 2016-09-24 21:17:55 +02:00
parent 08da6b278d
commit 07ec476b7d
2 changed files with 2 additions and 2 deletions

View File

@ -1557,7 +1557,7 @@ void MDLImporter::InternReadFile_3DGS_MDL7( )
} else {
pcNode->mName.length = ::strlen(szBuffer);
}
::strcpy(pcNode->mName.data,szBuffer);
::strncpy(pcNode->mName.data,szBuffer,MAXLEN);
++p;
}
}

View File

@ -660,7 +660,7 @@ void SMDImporter::CreateOutputMaterials()
if (aszTextures[iMat].length())
{
::strcpy(szName.data, aszTextures[iMat].c_str() );
::strncpy(szName.data, aszTextures[iMat].c_str(),MAXLEN );
szName.length = aszTextures[iMat].length();
pcMat->AddProperty(&szName,AI_MATKEY_TEXTURE_DIFFUSE(0));
}