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
b84a4aa5
Commit
b84a4aa5
authored
Sep 30, 2019
by
Andrew Eikum
Committed by
Alexandre Julliard
Sep 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xinput: Check for NULL argument in XInputGetState.
Signed-off-by:
Andrew Eikum
<
aeikum@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b03a4b89
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
xinput.c
dlls/xinput1_3/tests/xinput.c
+3
-0
xinput_main.c
dlls/xinput1_3/xinput_main.c
+3
-0
No files found.
dlls/xinput1_3/tests/xinput.c
View file @
b84a4aa5
...
...
@@ -126,6 +126,9 @@ static void test_get_state(void)
}
}
result
=
pXInputGetState
(
0
,
NULL
);
ok
(
result
==
ERROR_BAD_ARGUMENTS
,
"XInputGetState returned (%d)
\n
"
,
result
);
result
=
pXInputGetState
(
XUSER_MAX_COUNT
,
&
state
);
ok
(
result
==
ERROR_BAD_ARGUMENTS
,
"XInputGetState returned (%d)
\n
"
,
result
);
...
...
dlls/xinput1_3/xinput_main.c
View file @
b84a4aa5
...
...
@@ -88,6 +88,9 @@ DWORD WINAPI DECLSPEC_HOTPATCH XInputSetState(DWORD index, XINPUT_VIBRATION* vib
* XInputGetState() in the hook, so we need a wrapper. */
static
DWORD
xinput_get_state
(
DWORD
index
,
XINPUT_STATE
*
state
)
{
if
(
!
state
)
return
ERROR_BAD_ARGUMENTS
;
HID_find_gamepads
(
controllers
);
if
(
index
>=
XUSER_MAX_COUNT
)
...
...
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