Marcus Meissner : ole: ITypeInfo::Invoke stack overwrite fix.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Jan 11 14:34:26 CST 2006
Module: wine
Branch: refs/heads/master
Commit: cf173911a36294fe642bc39793919855607769fd
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=cf173911a36294fe642bc39793919855607769fd
Author: Marcus Meissner <marcus at jet.franken.de>
Date: Wed Jan 11 20:55:07 2006 +0100
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 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index 9fb1cda..b808243 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
More information about the wine-cvs
mailing list