check for invalid vertex

pull/3320/head
Robert Reif 2020-07-07 23:29:54 -04:00
parent 37c74f6fa3
commit 628394baec
1 changed files with 3 additions and 0 deletions

View File

@ -624,6 +624,9 @@ aiNode *AC3DImporter::ConvertObjectSection(Object &object,
++uv;
}
}
if (static_cast<unsigned>(vertices - mesh->mVertices) >= mesh->mNumVertices) {
throw DeadlyImportError("AC3D: Invalid number of vertices");
}
*vertices++ = object.vertices[entry3.first] + object.translation;
if (uv) {
uv->x = entry3.second.x;