d3dxof: Increase max childs/subobjects and check the limit is not overcome.
This commit is contained in:
parent
b46b75170e
commit
e4748c3ca3
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue