Commit e723d2a0 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3drm: Also validate face indices against the vertex count in load_mesh_data() (Valgrind).

parent fdd22f19
......@@ -1368,7 +1368,10 @@ HRESULT load_mesh_data(IDirect3DRMMeshBuilder3 *iface, IDirectXFileData *pData,
if (!This->nb_normals)
{
/* Compute face normal */
if (nb_face_indexes > 2)
if (nb_face_indexes > 2
&& faces_vertex_idx_ptr[0] < This->nb_vertices
&& faces_vertex_idx_ptr[1] < This->nb_vertices
&& faces_vertex_idx_ptr[2] < This->nb_vertices)
{
D3DVECTOR a, b;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment