Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
69e10bf1
Commit
69e10bf1
authored
Jul 14, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
Jul 14, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Add validation of parameters to CoGetClassObject and make sure to initialise ppv to NULL.
parent
932a2a0d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
compobj.c
dlls/ole32/compobj.c
+11
-0
compobj.c
dlls/ole32/tests/compobj.c
+12
-0
No files found.
dlls/ole32/compobj.c
View file @
69e10bf1
...
...
@@ -1618,6 +1618,17 @@ HRESULT WINAPI CoGetClassObject(
TRACE
(
"
\n\t
CLSID:
\t
%s,
\n\t
IID:
\t
%s
\n
"
,
debugstr_guid
(
rclsid
),
debugstr_guid
(
iid
));
if
(
!
ppv
)
return
E_INVALIDARG
;
*
ppv
=
NULL
;
if
(
!
COM_CurrentApt
())
{
ERR
(
"apartment not initialised
\n
"
);
return
CO_E_NOTINITIALIZED
;
}
if
(
pServerInfo
)
{
FIXME
(
"
\t
pServerInfo: name=%s
\n
"
,
debugstr_w
(
pServerInfo
->
pwszName
));
FIXME
(
"
\t\t
pAuthInfo=%p
\n
"
,
pServerInfo
->
pAuthInfo
);
...
...
dlls/ole32/tests/compobj.c
View file @
69e10bf1
...
...
@@ -100,6 +100,17 @@ static void test_CoCreateInstance(void)
ok
(
hr
==
CO_E_NOTINITIALIZED
,
"CoCreateInstance should have returned CO_E_NOTINITIALIZED instead of 0x%08lx
\n
"
,
hr
);
}
static
void
test_CoGetClassObject
(
void
)
{
IUnknown
*
pUnk
=
(
IUnknown
*
)
0xdeadbeef
;
HRESULT
hr
=
CoGetClassObject
(
&
CLSID_MyComputer
,
CLSCTX_INPROC_SERVER
,
NULL
,
&
IID_IUnknown
,
(
void
**
)
&
pUnk
);
ok
(
hr
==
CO_E_NOTINITIALIZED
,
"CoGetClassObject should have returned CO_E_NOTINITIALIZED instead of 0x%08lx
\n
"
,
hr
);
ok
(
pUnk
==
NULL
,
"CoGetClassObject should have changed the passed in pointer to NULL, instead of %p
\n
"
,
pUnk
);
hr
=
CoGetClassObject
(
&
CLSID_MyComputer
,
CLSCTX_INPROC_SERVER
,
NULL
,
&
IID_IUnknown
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"CoGetClassObject should have returned E_INVALIDARG instead of 0x%08lx
\n
"
,
hr
);
}
static
ATOM
register_dummy_class
(
void
)
{
WNDCLASS
wc
=
...
...
@@ -138,4 +149,5 @@ START_TEST(compobj)
test_CLSIDFromString
();
test_CoCreateInstance
();
test_ole_menu
();
test_CoGetClassObject
();
}
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