Commit e4748c3c authored by Christian Costa's avatar Christian Costa Committed by Alexandre Julliard

d3dxof: Increase max childs/subobjects and check the limit is not overcome.

parent b46b7517
......@@ -1989,6 +1989,12 @@ _exit:
}
}
if (buf->pxo->nb_childs > MAX_CHILDS)
{
FIXME("Too many childs %d\n", buf->pxo->nb_childs);
return FALSE;
}
return TRUE;
}
......@@ -2094,6 +2100,11 @@ static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileE
}
This->buf.pxo->nb_subobjects = This->buf.cur_subobject;
if (This->buf.cur_subobject > MAX_SUBOBJECTS)
{
FIXME("Too many suobjects %d\n", This->buf.cur_subobject);
return DXFILEERR_BADALLOC;
}
object->pobj = This->buf.pxo;
object->cur_enum_object = 0;
......
......@@ -36,10 +36,10 @@
#define MAX_NAME_LEN 32
#define MAX_ARRAY_DIM 1
#define MAX_MEMBERS 50
#define MAX_CHILDS 10
#define MAX_CHILDS 20
#define MAX_TEMPLATES 200
#define MAX_OBJECTS 200
#define MAX_SUBOBJECTS 20
#define MAX_SUBOBJECTS 120
typedef struct {
DWORD type;
......
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