Merge pull request #632 from turol/afl-fixes

Random crash fixes
This commit is contained in:
Kim Kulling
2015-08-14 16:13:54 +02:00
6 changed files with 43 additions and 1 deletions

View File

@@ -303,6 +303,9 @@ void STLImporter::LoadASCIIFile()
}
else
{
if (sz[6] == '\0') {
throw DeadlyImportError("STL: unexpected EOF while parsing facet");
}
sz += 7;
SkipSpaces(&sz);
sz = fast_atoreal_move<float>(sz, (float&)vn->x );
@@ -323,6 +326,9 @@ void STLImporter::LoadASCIIFile()
}
else
{
if (sz[6] == '\0') {
throw DeadlyImportError("STL: unexpected EOF while parsing facet");
}
sz += 7;
SkipSpaces(&sz);
positionBuffer.push_back(aiVector3D());