[PATCH] oleaut32: ITypeInfo_ReleaseFuncDesc_Proxy handle NULL parameter
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- dlls/oleaut32/usrmarshal.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/oleaut32/usrmarshal.c b/dlls/oleaut32/usrmarshal.c index 163b48f6f4..07dabde174 100644 --- a/dlls/oleaut32/usrmarshal.c +++ b/dlls/oleaut32/usrmarshal.c @@ -1905,6 +1905,9 @@ void CALLBACK ITypeInfo_ReleaseFuncDesc_Proxy( SHORT param; TRACE("(%p, %p)\n", This, pFuncDesc); + if (!pFuncDesc) + return; + for(param = 0; param < pFuncDesc->cParams; param++) free_embedded_elemdesc(pFuncDesc->lprgelemdescParam + param); if(param) -- 2.28.0
Is it possible to add a test for this? And ideally a bug reference too.
From: wine-devel <wine-devel-bounces(a)winehq.org> On Behalf Of Nikolay Sivov Sent: Wednesday, September 09, 2020 5:46 AM Subject: Re: [PATCH] oleaut32: ITypeInfo_ReleaseFuncDesc_Proxy handle NULL parameter
Is it possible to add a test for this? And ideally a bug reference too.
Agreed, this fix seems strange in isolation. Why only ReleaseFuncDesc and not ReleaseVarDesc or ReleaseTypeAttr? And why should the proxy tolerate NULL, but not direct (in-apartment) calls? Not saying it's definitely wrong, but it seems incomplete if freeing NULL is supposed to be OK.
participants (3)
-
Alistair Leslie-Hughes -
Nikolay Sivov -
Puetz Kevin A