Browse Source

CMS: Fix possible overflow access (#6052)

- closes https://github.com/assimp/assimp/issues/6010
Kim Kulling 6 tháng trước cách đây
mục cha
commit
2690e354da
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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++;
                     }