Merge pull request #4283 from assimp/kimkulling-avoid_invalid_string_access_issue4222
LWS-Import: Avoid access to empty string tokenpull/4284/head
commit
64af16c427
|
@ -537,6 +537,11 @@ void LWSImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
|
||||||
|
|
||||||
// get file format version and print to log
|
// get file format version and print to log
|
||||||
++it;
|
++it;
|
||||||
|
|
||||||
|
if ((*it).tokens[0].empty()) {
|
||||||
|
ASSIMP_LOG_ERROR("Invalid LWS file detectedm abort import.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
unsigned int version = strtoul10((*it).tokens[0].c_str());
|
unsigned int version = strtoul10((*it).tokens[0].c_str());
|
||||||
ASSIMP_LOG_INFO("LWS file format version is ", (*it).tokens[0]);
|
ASSIMP_LOG_INFO("LWS file format version is ", (*it).tokens[0]);
|
||||||
first = 0.;
|
first = 0.;
|
||||||
|
|
Loading…
Reference in New Issue