Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
33582cc6
Commit
33582cc6
authored
Jul 31, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
Jul 31, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Add some validation for the DISPPARAMS structure in ITypeInfo::Invoke.
parent
e3e42985
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
typelib.c
dlls/oleaut32/tests/typelib.c
+9
-0
typelib.c
dlls/oleaut32/typelib.c
+14
-0
No files found.
dlls/oleaut32/tests/typelib.c
View file @
33582cc6
...
...
@@ -461,6 +461,15 @@ static void test_TypeInfo(void)
hr
=
ITypeInfo_Invoke
(
pTypeInfo
,
(
void
*
)
0xdeadbeef
,
dispidMember
,
DISPATCH_PROPERTYGET
,
&
dispparams
,
NULL
,
NULL
,
NULL
);
ok
(
hr
==
DISP_E_MEMBERNOTFOUND
,
"ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx
\n
"
,
hr
);
/* test NULL dispparams */
hr
=
ITypeInfo_Invoke
(
pTypeInfo
,
(
void
*
)
0xdeadbeef
,
dispidMember
,
DISPATCH_METHOD
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08lx
\n
"
,
hr
);
/* test dispparams->cNamedArgs being bigger than dispparams->cArgs */
dispparams
.
cNamedArgs
=
1
;
hr
=
ITypeInfo_Invoke
(
pTypeInfo
,
(
void
*
)
0xdeadbeef
,
dispidMember
,
DISPATCH_METHOD
,
&
dispparams
,
NULL
,
NULL
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08lx
\n
"
,
hr
);
ITypeInfo_Release
(
pTypeInfo
);
hr
=
ITypeLib_GetTypeInfoOfGuid
(
pTypeLib
,
&
IID_IDispatch
,
&
pTypeInfo
);
...
...
dlls/oleaut32/typelib.c
View file @
33582cc6
...
...
@@ -5218,8 +5218,22 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
TRACE
(
"(%p)(%p,id=%ld,flags=0x%08x,%p,%p,%p,%p)
\n
"
,
This
,
pIUnk
,
memid
,
wFlags
,
pDispParams
,
pVarResult
,
pExcepInfo
,
pArgErr
);
if
(
!
pDispParams
)
{
ERR
(
"NULL pDispParams not allowed
\n
"
);
return
E_INVALIDARG
;
}
dump_DispParms
(
pDispParams
);
if
(
pDispParams
->
cNamedArgs
>
pDispParams
->
cArgs
)
{
ERR
(
"named argument array cannot be bigger than argument array (%d/%d)
\n
"
,
pDispParams
->
cNamedArgs
,
pDispParams
->
cArgs
);
return
E_INVALIDARG
;
}
/* we do this instead of using GetFuncDesc since it will return a fake
* FUNCDESC for dispinterfaces and we want the real function description */
for
(
pFuncInfo
=
This
->
funclist
;
pFuncInfo
;
pFuncInfo
=
pFuncInfo
->
next
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment