浏览代码

CMS: Fix possible overflow access (#6052)

- closes https://github.com/assimp/assimp/issues/6010
Kim Kulling 6 月之前
父节点
当前提交
2690e354da
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      code/AssetLib/CSM/CSMLoader.cpp

+ 1 - 1
code/AssetLib/CSM/CSMLoader.cpp

@@ -150,7 +150,7 @@ void CSMImporter::InternReadFile( const std::string& pFile,
                     aiNodeAnim* nda = anims_temp.back();
 
                     char* ot = nda->mNodeName.data;
-                    while (!IsSpaceOrNewLine(*buffer)) {
+                    while (!IsSpaceOrNewLine(*buffer) && buffer != end) {
                         *ot++ = *buffer++;
                     }