Fix crashes (#6138)

This commit is contained in:
Kim Kulling
2025-05-07 23:40:53 +02:00
committed by GitHub
parent 2056679e98
commit 327afe0183
2 changed files with 8 additions and 4 deletions
+3 -2
View File
@@ -150,8 +150,9 @@ void CSMImporter::InternReadFile( const std::string& pFile,
anims_temp.push_back(new aiNodeAnim());
aiNodeAnim* nda = anims_temp.back();
char* ot = nda->mNodeName.data;
while (!IsSpaceOrNewLine(*buffer) && buffer != end) {
char *ot = nda->mNodeName.data;
const char *ot_end = nda->mNodeName.data + AI_MAXLEN;
while (!IsSpaceOrNewLine(*buffer) && buffer != end && ot != ot_end) {
*ot++ = *buffer++;
}