From cf173911a36294fe642bc39793919855607769fd Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Wed, 11 Jan 2006 20:55:07 +0100 Subject: [PATCH] ole: ITypeInfo::Invoke stack overwrite fix. Have enough stack space up to even VT_VARIANTs, fixes a stack corruption. --- dlls/oleaut32/typelib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 9fb1cda4390..b8082430f2d 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -5205,7 +5205,7 @@ static HRESULT WINAPI ITypeInfo_fnInvoke( VARIANT varresult; SHORT missing_param_offset = func_desc->cParams; SHORT missing_params = 0; - void *retval; /* pointer for storing byref retvals in */ + VARIANT retval; /* pointer for storing byref retvals in */ hres = S_OK; for (i = 0; i < func_desc->cParams; i++) @@ -5238,7 +5238,7 @@ static HRESULT WINAPI ITypeInfo_fnInvoke( arg = prgpvarg[i] = &rgvarg[i]; memset(arg, 0, sizeof(*arg)); V_VT(arg) = rgvt[i]; - retval = NULL; + memset(&retval, 0, sizeof(retval)); V_BYREF(arg) = &retval; } else