STL: Fix another read past EOF

pull/632/head
Turo Lamminen 2015-08-11 15:53:16 +03:00
parent d185cea81c
commit e5ddb98dde
1 changed files with 6 additions and 0 deletions

View File

@ -304,6 +304,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 );
@ -324,6 +327,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());