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
0e757229
Commit
0e757229
authored
Sep 23, 2021
by
Rémi Bernon
Committed by
Alexandre Julliard
Sep 23, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Check data format dwObjSize in IDirectInputDevice2WImpl_SetDataFormat.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2064181c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
1 deletion
+1
-1
device.c
dlls/dinput/device.c
+1
-0
hid.c
dlls/dinput8/tests/hid.c
+0
-1
No files found.
dlls/dinput/device.c
View file @
0e757229
...
...
@@ -1094,6 +1094,7 @@ HRESULT WINAPI IDirectInputDevice2WImpl_SetDataFormat(LPDIRECTINPUTDEVICE8W ifac
_dump_DIDATAFORMAT
(
df
);
if
(
df
->
dwSize
!=
sizeof
(
DIDATAFORMAT
))
return
DIERR_INVALIDPARAM
;
if
(
df
->
dwObjSize
!=
sizeof
(
DIOBJECTDATAFORMAT
))
return
DIERR_INVALIDPARAM
;
if
(
This
->
acquired
)
return
DIERR_ACQUIRED
;
EnterCriticalSection
(
&
This
->
crit
);
...
...
dlls/dinput8/tests/hid.c
View file @
0e757229
...
...
@@ -4015,7 +4015,6 @@ static void test_simple_joystick(void)
ok
(
hr
==
DIERR_INVALIDPARAM
,
"IDirectInputDevice8_SetDataFormat returned: %#x
\n
"
,
hr
);
dataformat
.
dwSize
=
sizeof
(
DIDATAFORMAT
);
hr
=
IDirectInputDevice8_SetDataFormat
(
device
,
&
dataformat
);
todo_wine
ok
(
hr
==
DIERR_INVALIDPARAM
,
"IDirectInputDevice8_SetDataFormat returned: %#x
\n
"
,
hr
);
dataformat
.
dwObjSize
=
sizeof
(
DIOBJECTDATAFORMAT
);
hr
=
IDirectInputDevice8_SetDataFormat
(
device
,
&
dataformat
);
...
...
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