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
f12e445c
Commit
f12e445c
authored
Sep 12, 2008
by
Rob Shearman
Committed by
Alexandre Julliard
Sep 12, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Don't crash in NdrDllGetClassObject when a NULL pclsid is passed in.
Add tests for this.
parent
be9909ad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
cpsf.c
dlls/rpcrt4/cpsf.c
+1
-1
cstub.c
dlls/rpcrt4/tests/cstub.c
+13
-0
No files found.
dlls/rpcrt4/cpsf.c
View file @
f12e445c
...
...
@@ -174,7 +174,7 @@ HRESULT WINAPI NdrDllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv,
if
(
max_delegating_vtbl_size
>
0
)
create_delegating_vtbl
(
max_delegating_vtbl_size
);
}
if
(
IsEqualGUID
(
rclsid
,
pclsid
))
if
(
pclsid
&&
IsEqualGUID
(
rclsid
,
pclsid
))
return
IPSFactoryBuffer_QueryInterface
((
LPPSFACTORYBUFFER
)
pPSFactoryBuffer
,
iid
,
ppv
);
else
{
const
ProxyFileInfo
*
info
;
...
...
dlls/rpcrt4/tests/cstub.c
View file @
f12e445c
...
...
@@ -432,6 +432,7 @@ static IPSFactoryBuffer *test_NdrDllGetClassObject(void)
{
IPSFactoryBuffer
*
ppsf
=
NULL
;
const
CLSID
PSDispatch
=
{
0x20420
,
0
,
0
,
{
0xc0
,
0
,
0
,
0
,
0
,
0
,
0
,
0x46
}};
const
CLSID
CLSID_Unknown
=
{
0x45678
,
0x1234
,
0x6666
,
{
0xff
,
0x67
,
0x45
,
0x98
,
0x76
,
0x12
,
0x34
,
0x56
}};
HRESULT
r
;
HMODULE
hmod
=
LoadLibraryA
(
"rpcrt4.dll"
);
void
*
CStd_QueryInterface
=
GetProcAddress
(
hmod
,
"CStdStubBuffer_QueryInterface"
);
...
...
@@ -446,6 +447,11 @@ static IPSFactoryBuffer *test_NdrDllGetClassObject(void)
void
*
CStd_DebugServerRelease
=
GetProcAddress
(
hmod
,
"CStdStubBuffer_DebugServerRelease"
);
r
=
NdrDllGetClassObject
(
&
PSDispatch
,
&
IID_IPSFactoryBuffer
,
(
void
**
)
&
ppsf
,
proxy_file_list
,
&
CLSID_Unknown
,
&
PSFactoryBuffer
);
ok
(
r
==
CLASS_E_CLASSNOTAVAILABLE
,
"NdrDllGetClassObject with unknown clsid should have returned CLASS_E_CLASSNOTAVAILABLE instead of 0x%x
\n
"
,
r
);
ok
(
ppsf
==
NULL
,
"NdrDllGetClassObject should have set ppsf to NULL on failure
\n
"
);
r
=
NdrDllGetClassObject
(
&
PSDispatch
,
&
IID_IPSFactoryBuffer
,
(
void
**
)
&
ppsf
,
proxy_file_list
,
&
PSDispatch
,
&
PSFactoryBuffer
);
ok
(
r
==
S_OK
,
"ret %08x
\n
"
,
r
);
...
...
@@ -518,6 +524,13 @@ static IPSFactoryBuffer *test_NdrDllGetClassObject(void)
#undef VTBL_TEST_ZERO
ok
(
PSFactoryBuffer
.
RefCount
==
1
,
"ref count %d
\n
"
,
PSFactoryBuffer
.
RefCount
);
IPSFactoryBuffer_Release
(
ppsf
);
r
=
NdrDllGetClassObject
(
&
IID_if3
,
&
IID_IPSFactoryBuffer
,
(
void
**
)
&
ppsf
,
proxy_file_list
,
NULL
,
&
PSFactoryBuffer
);
ok
(
r
==
S_OK
,
"ret %08x
\n
"
,
r
);
ok
(
ppsf
!=
NULL
,
"ppsf == NULL
\n
"
);
return
ppsf
;
}
...
...
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