d3drm: Also validate face indices against the vertex count in load_mesh_data() (Valgrind).
This commit is contained in:
parent
fdd22f197a
commit
e723d2a079
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue