Commit 9fe25eae authored by Alexandre Julliard's avatar Alexandre Julliard

vbscript: Fix a memory allocation size to avoid overflows.

parent a7df4958
......@@ -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;
......
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