AC3D: Throw exception on too many vertices instead of crashing
This commit is contained in:
@@ -598,6 +598,9 @@ aiNode* AC3DImporter::ConvertObjectSection(Object& object,
|
||||
face.mIndices[i] = cur++;
|
||||
|
||||
// copy vertex positions
|
||||
if ((vertices - mesh->mVertices) >= mesh->mNumVertices) {
|
||||
throw DeadlyImportError("AC3D: Invalid number of vertices");
|
||||
}
|
||||
*vertices = object.vertices[entry.first] + object.translation;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user