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
55edfc88
Commit
55edfc88
authored
Jun 16, 2019
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Jun 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Ensure buffer doesn't overflow (Coverity).
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c2a8f3d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
joystick.c
dlls/dinput/joystick.c
+1
-1
joystick_linuxinput.c
dlls/dinput/joystick_linuxinput.c
+2
-2
No files found.
dlls/dinput/joystick.c
View file @
55edfc88
...
...
@@ -700,7 +700,7 @@ HRESULT WINAPI JoystickAGenericImpl_GetDeviceInfo(
/* we only support traditional joysticks for now */
pdidi
->
dwDevType
=
This
->
devcaps
.
dwDevType
;
snprintf
(
pdidi
->
tszInstanceName
,
MAX_PATH
,
"Joystick %d"
,
index
);
strcpy
(
pdidi
->
tszProductName
,
This
->
name
);
lstrcpynA
(
pdidi
->
tszProductName
,
This
->
name
,
MAX_PATH
);
if
(
pdidi
->
dwSize
>
sizeof
(
DIDEVICEINSTANCE_DX3A
))
{
pdidi
->
guidFFDriver
=
GUID_NULL
;
pdidi
->
wUsagePage
=
0
;
...
...
dlls/dinput/joystick_linuxinput.c
View file @
55edfc88
...
...
@@ -411,8 +411,8 @@ static void fill_joystick_dideviceinstanceA(LPDIDEVICEINSTANCEA lpddi, DWORD ver
lpddi
->
guidInstance
=
lpddiW
.
guidInstance
;
lpddi
->
guidProduct
=
lpddiW
.
guidProduct
;
lpddi
->
dwDevType
=
lpddiW
.
dwDevType
;
strcpy
(
lpddi
->
tszInstanceName
,
joydevs
[
id
].
name
);
strcpy
(
lpddi
->
tszProductName
,
joydevs
[
id
].
name
);
lstrcpynA
(
lpddi
->
tszInstanceName
,
joydevs
[
id
].
name
,
MAX_PATH
);
lstrcpynA
(
lpddi
->
tszProductName
,
joydevs
[
id
].
name
,
MAX_PATH
);
lpddi
->
guidFFDriver
=
lpddiW
.
guidFFDriver
;
lpddi
->
wUsagePage
=
lpddiW
.
wUsagePage
;
lpddi
->
wUsage
=
lpddiW
.
wUsage
;
...
...
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