vbscript: Fix a memory allocation size to avoid overflows.

This commit is contained in:
Alexandre Julliard 2011-09-16 19:36:52 +02:00
parent a7df4958ab
commit 9fe25eae4a
1 changed files with 1 additions and 1 deletions

View File

@ -398,7 +398,7 @@ HRESULT create_vbdisp(const class_desc_t *desc, vbdisp_t **ret)
{
vbdisp_t *vbdisp;
vbdisp = heap_alloc_zero(sizeof(*vbdisp) + (desc->prop_cnt-1)*sizeof(VARIANT));
vbdisp = heap_alloc_zero( FIELD_OFFSET( vbdisp_t, props[desc->prop_cnt] ));
if(!vbdisp)
return E_OUTOFMEMORY;