Commit 787ac750 authored by Andrew Eikum's avatar Andrew Eikum Committed by Alexandre Julliard

oleaut32: Sanity check some arguments.

parent 3a5eef4e
...@@ -5498,6 +5498,9 @@ static HRESULT WINAPI ITypeInfo_fnGetFuncDesc( ITypeInfo2 *iface, UINT index, ...@@ -5498,6 +5498,9 @@ static HRESULT WINAPI ITypeInfo_fnGetFuncDesc( ITypeInfo2 *iface, UINT index,
TRACE("(%p) index %d\n", This, index); TRACE("(%p) index %d\n", This, index);
if (!ppFuncDesc)
return E_INVALIDARG;
if (This->TypeAttr.typekind == TKIND_DISPATCH) if (This->TypeAttr.typekind == TKIND_DISPATCH)
hr = ITypeInfoImpl_GetInternalDispatchFuncDesc((ITypeInfo *)iface, index, hr = ITypeInfoImpl_GetInternalDispatchFuncDesc((ITypeInfo *)iface, index,
&internal_funcdesc, NULL, &internal_funcdesc, NULL,
...@@ -5729,6 +5732,9 @@ static HRESULT WINAPI ITypeInfo_fnGetImplTypeFlags( ITypeInfo2 *iface, ...@@ -5729,6 +5732,9 @@ static HRESULT WINAPI ITypeInfo_fnGetImplTypeFlags( ITypeInfo2 *iface,
TRACE("(%p) index %d\n", This, index); TRACE("(%p) index %d\n", This, index);
if(!pImplTypeFlags)
return E_INVALIDARG;
if(This->TypeAttr.typekind == TKIND_DISPATCH && index == 0){ if(This->TypeAttr.typekind == TKIND_DISPATCH && index == 0){
*pImplTypeFlags = 0; *pImplTypeFlags = 0;
return S_OK; return S_OK;
...@@ -7027,6 +7033,9 @@ static HRESULT WINAPI ITypeInfo_fnGetRefTypeInfo( ...@@ -7027,6 +7033,9 @@ static HRESULT WINAPI ITypeInfo_fnGetRefTypeInfo(
ITypeInfoImpl *This = impl_from_ITypeInfo2(iface); ITypeInfoImpl *This = impl_from_ITypeInfo2(iface);
HRESULT result = E_FAIL; HRESULT result = E_FAIL;
if(!ppTInfo)
return E_INVALIDARG;
if ((This->hreftype != -1) && (This->hreftype == hRefType)) if ((This->hreftype != -1) && (This->hreftype == hRefType))
{ {
*ppTInfo = (ITypeInfo *)&This->ITypeInfo2_iface; *ppTInfo = (ITypeInfo *)&This->ITypeInfo2_iface;
...@@ -7424,6 +7433,9 @@ static HRESULT WINAPI ITypeInfo2_fnGetCustData( ...@@ -7424,6 +7433,9 @@ static HRESULT WINAPI ITypeInfo2_fnGetCustData(
TRACE("%p %s %p\n", This, debugstr_guid(guid), pVarVal); TRACE("%p %s %p\n", This, debugstr_guid(guid), pVarVal);
if(!guid || !pVarVal)
return E_INVALIDARG;
pCData = TLB_get_custdata_by_guid(&This->custdata_list, guid); pCData = TLB_get_custdata_by_guid(&This->custdata_list, guid);
VariantInit( pVarVal); VariantInit( pVarVal);
......
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