LWSLoader: Fix out of bounds iterator access
Fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38947 Fix #4222
This commit is contained in:
@@ -537,8 +537,8 @@ void LWSImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
|
||||
|
||||
// get file format version and print to log
|
||||
++it;
|
||||
|
||||
if ((*it).tokens[0].empty()) {
|
||||
|
||||
if (it == root.children.end() || (*it).tokens[0].empty()) {
|
||||
ASSIMP_LOG_ERROR("Invalid LWS file detectedm abort import.");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user