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
e2e3f70e
Commit
e2e3f70e
authored
May 08, 2018
by
Zebediah Figura
Committed by
Alexandre Julliard
May 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msdmo: Fix pointer checking in IEnumDMO_Next().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
216e1f25
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
dmoreg.c
dlls/msdmo/dmoreg.c
+6
-3
msdmo.c
dlls/msdmo/tests/msdmo.c
+8
-1
No files found.
dlls/msdmo/dmoreg.c
View file @
e2e3f70e
...
...
@@ -519,9 +519,12 @@ static HRESULT WINAPI IEnumDMO_fnNext(
TRACE
(
"(%p)->(%d %p %p %p)
\n
"
,
This
,
cItemsToFetch
,
pCLSID
,
Names
,
pcItemsFetched
);
if
(
!
pCLSID
||
!
Names
||
!
pcItemsFetched
)
if
(
!
pCLSID
||
!
Names
)
return
E_POINTER
;
if
(
!
pcItemsFetched
&&
cItemsToFetch
>
1
)
return
E_INVALIDARG
;
while
(
count
<
cItemsToFetch
)
{
This
->
index
++
;
...
...
@@ -656,8 +659,8 @@ static HRESULT WINAPI IEnumDMO_fnNext(
count
++
;
}
*
pcItemsFetched
=
count
;
if
(
*
pcItemsFetched
<
cItemsToFetch
)
if
(
pcItemsFetched
)
*
pcItemsFetched
=
count
;
if
(
count
<
cItemsToFetch
)
hres
=
S_FALSE
;
TRACE
(
"<-- %i found
\n
"
,
count
);
...
...
dlls/msdmo/tests/msdmo.c
View file @
e2e3f70e
...
...
@@ -92,14 +92,21 @@ static void test_DMOEnum(void)
HRESULT
hr
;
CLSID
clsid
;
WCHAR
*
name
;
DWORD
count
;
hr
=
DMOEnum
(
&
GUID_unknowncategory
,
0
,
0
,
NULL
,
0
,
NULL
,
&
enum_dmo
);
ok
(
hr
==
S_OK
,
"DMOEnum() failed with %#x
\n
"
,
hr
);
hr
=
IEnumDMO_Next
(
enum_dmo
,
1
,
&
clsid
,
&
name
,
NULL
);
todo_wine
ok
(
hr
==
S_FALSE
,
"expected S_FALSE, got %#x
\n
"
,
hr
);
hr
=
IEnumDMO_Next
(
enum_dmo
,
2
,
&
clsid
,
&
name
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG, got %#x
\n
"
,
hr
);
hr
=
IEnumDMO_Next
(
enum_dmo
,
2
,
&
clsid
,
&
name
,
&
count
);
ok
(
hr
==
S_FALSE
,
"expected S_FALSE, got %#x
\n
"
,
hr
);
ok
(
count
==
0
,
"expected 0, got %d
\n
"
,
count
);
IEnumDMO_Release
(
enum_dmo
);
}
...
...
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