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
a630b125
Commit
a630b125
authored
Apr 05, 2024
by
Brendan Shanks
Committed by
Alexandre Julliard
Apr 09, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecoreaudio: Correctly handle devices whose UID contains non-ASCII characters.
parent
14a51fa4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
coreaudio.c
dlls/winecoreaudio.drv/coreaudio.c
+8
-2
No files found.
dlls/winecoreaudio.drv/coreaudio.c
View file @
a630b125
...
@@ -325,7 +325,12 @@ static NTSTATUS unix_get_endpoint_ids(void *args)
...
@@ -325,7 +325,12 @@ static NTSTATUS unix_get_endpoint_ids(void *args)
for
(
i
=
0
;
i
<
params
->
num
;
i
++
){
for
(
i
=
0
;
i
<
params
->
num
;
i
++
){
const
SIZE_T
name_len
=
CFStringGetLength
(
info
[
i
].
name
)
+
1
;
const
SIZE_T
name_len
=
CFStringGetLength
(
info
[
i
].
name
)
+
1
;
const
SIZE_T
device_len
=
CFStringGetLength
(
info
[
i
].
uid
)
+
1
;
CFIndex
device_len
;
CFStringGetBytes
(
info
[
i
].
uid
,
CFRangeMake
(
0
,
CFStringGetLength
(
info
[
i
].
uid
)),
kCFStringEncodingUTF8
,
0
,
false
,
NULL
,
0
,
&
device_len
);
device_len
++
;
/* for null terminator */
needed
+=
name_len
*
sizeof
(
WCHAR
)
+
((
device_len
+
1
)
&
~
1
);
needed
+=
name_len
*
sizeof
(
WCHAR
)
+
((
device_len
+
1
)
&
~
1
);
if
(
needed
<=
params
->
size
){
if
(
needed
<=
params
->
size
){
...
@@ -336,7 +341,8 @@ static NTSTATUS unix_get_endpoint_ids(void *args)
...
@@ -336,7 +341,8 @@ static NTSTATUS unix_get_endpoint_ids(void *args)
offset
+=
name_len
*
sizeof
(
WCHAR
);
offset
+=
name_len
*
sizeof
(
WCHAR
);
endpoint
->
device
=
offset
;
endpoint
->
device
=
offset
;
CFStringGetCString
(
info
[
i
].
uid
,
(
char
*
)
params
->
endpoints
+
offset
,
params
->
size
-
offset
,
kCFStringEncodingUTF8
);
CFStringGetBytes
(
info
[
i
].
uid
,
CFRangeMake
(
0
,
CFStringGetLength
(
info
[
i
].
uid
)),
kCFStringEncodingUTF8
,
0
,
false
,
(
UInt8
*
)
params
->
endpoints
+
offset
,
params
->
size
-
offset
,
NULL
);
((
char
*
)
params
->
endpoints
)[
offset
+
device_len
-
1
]
=
'\0'
;
((
char
*
)
params
->
endpoints
)[
offset
+
device_len
-
1
]
=
'\0'
;
offset
+=
(
device_len
+
1
)
&
~
1
;
offset
+=
(
device_len
+
1
)
&
~
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