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
c45d792d
Commit
c45d792d
authored
May 04, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mmdevapi: Avoid wcsncpy().
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
af34af7b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
main.c
dlls/mmdevapi/main.c
+1
-2
No files found.
dlls/mmdevapi/main.c
View file @
c45d792d
...
...
@@ -404,8 +404,7 @@ static HRESULT get_mmdevice_by_activatepath(const WCHAR *path, IMMDevice **mmdev
}
else
if
(
!
memcmp
(
path
,
MMDEV_PATH_PREFIX
,
sizeof
(
MMDEV_PATH_PREFIX
)
-
sizeof
(
WCHAR
)))
{
WCHAR
device_id
[
56
];
/* == strlen("{0.0.1.00000000}.{fd47d9cc-4218-4135-9ce2-0c195c87405b}") + 1 */
wcsncpy
(
device_id
,
path
+
(
ARRAY_SIZE
(
MMDEV_PATH_PREFIX
)
-
1
),
ARRAY_SIZE
(
device_id
));
device_id
[
ARRAY_SIZE
(
device_id
)
-
1
]
=
0
;
lstrcpynW
(
device_id
,
path
+
(
ARRAY_SIZE
(
MMDEV_PATH_PREFIX
)
-
1
),
ARRAY_SIZE
(
device_id
));
hr
=
IMMDeviceEnumerator_GetDevice
(
devenum
,
device_id
,
mmdev
);
}
else
{
...
...
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