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
852c61c5
Commit
852c61c5
authored
Feb 10, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 10, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxgi: Properly check if the output array is large enough in dxgi_output_GetDisplayModeList().
parent
d9570c39
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
output.c
dlls/dxgi/output.c
+8
-1
device.c
dlls/dxgi/tests/device.c
+2
-2
No files found.
dlls/dxgi/output.c
View file @
852c61c5
...
...
@@ -155,7 +155,14 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_GetDisplayModeList(IDXGIOutput *ifa
return
S_OK
;
}
*
mode_count
=
min
(
*
mode_count
,
max_count
);
if
(
max_count
>
*
mode_count
)
{
wined3d_decref
(
wined3d
);
LeaveCriticalSection
(
&
dxgi_cs
);
return
DXGI_ERROR_MORE_DATA
;
}
*
mode_count
=
max_count
;
for
(
i
=
0
;
i
<
*
mode_count
;
++
i
)
{
...
...
dlls/dxgi/tests/device.c
View file @
852c61c5
...
...
@@ -315,7 +315,7 @@ static void test_output(void)
mode_count
=
0
;
hr
=
IDXGIOutput_GetDisplayModeList
(
output
,
DXGI_FORMAT_R8G8B8A8_UNORM
,
DXGI_ENUM_MODES_SCALING
,
&
mode_count
,
modes
);
todo_wine
ok
(
hr
==
DXGI_ERROR_MORE_DATA
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
DXGI_ERROR_MORE_DATA
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
!
modes
[
0
].
Height
,
"No output was expected.
\n
"
);
mode_count
=
mode_count_comp
;
...
...
@@ -340,7 +340,7 @@ static void test_output(void)
mode_count
=
mode_count_comp
-
1
;
hr
=
IDXGIOutput_GetDisplayModeList
(
output
,
DXGI_FORMAT_R8G8B8A8_UNORM
,
DXGI_ENUM_MODES_SCALING
,
&
mode_count
,
modes
);
todo_wine
ok
(
hr
==
DXGI_ERROR_MORE_DATA
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
DXGI_ERROR_MORE_DATA
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
mode_count
==
mode_count_comp
-
1
,
"Got unexpected mode_count %u, expected %u.
\n
"
,
mode_count
,
mode_count_comp
-
1
);
}
...
...
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