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
594de90c
Commit
594de90c
authored
Mar 20, 2010
by
William Waghorn
Committed by
Alexandre Julliard
Mar 22, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound: Ensure device name and description buffers are NUL terminated.
parent
73e669c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
dsound_main.c
dlls/dsound/dsound_main.c
+10
-0
No files found.
dlls/dsound/dsound_main.c
View file @
594de90c
...
...
@@ -378,8 +378,12 @@ HRESULT WINAPI DirectSoundEnumerateW(
debugstr_guid
(
&
DSOUND_renderer_guids
[
wod
]),
desc
.
szDesc
,
desc
.
szDrvname
,
lpContext
);
MultiByteToWideChar
(
CP_ACP
,
0
,
desc
.
szDesc
,
-
1
,
wDesc
,
sizeof
(
wDesc
)
/
sizeof
(
WCHAR
)
);
wDesc
[(
sizeof
(
wDesc
)
/
sizeof
(
WCHAR
))
-
1
]
=
'\0'
;
MultiByteToWideChar
(
CP_ACP
,
0
,
desc
.
szDrvname
,
-
1
,
wName
,
sizeof
(
wName
)
/
sizeof
(
WCHAR
)
);
wName
[(
sizeof
(
wName
)
/
sizeof
(
WCHAR
))
-
1
]
=
'\0'
;
if
(
lpDSEnumCallback
(
&
DSOUND_renderer_guids
[
wod
],
wDesc
,
wName
,
lpContext
)
==
FALSE
)
return
DS_OK
;
}
...
...
@@ -462,6 +466,8 @@ DirectSoundCaptureEnumerateW(
wDesc
,
sizeof
(
wDesc
)
/
sizeof
(
WCHAR
)
);
MultiByteToWideChar
(
CP_ACP
,
0
,
desc
.
szDrvname
,
-
1
,
wName
,
sizeof
(
wName
)
/
sizeof
(
WCHAR
)
);
wName
[(
sizeof
(
wName
)
/
sizeof
(
WCHAR
))
-
1
]
=
'\0'
;
if
(
lpDSEnumCallback
(
NULL
,
wDesc
,
wName
,
lpContext
)
==
FALSE
)
return
DS_OK
;
}
...
...
@@ -477,8 +483,12 @@ DirectSoundCaptureEnumerateW(
debugstr_guid
(
&
DSOUND_capture_guids
[
wid
]),
desc
.
szDesc
,
desc
.
szDrvname
,
lpContext
);
MultiByteToWideChar
(
CP_ACP
,
0
,
desc
.
szDesc
,
-
1
,
wDesc
,
sizeof
(
wDesc
)
/
sizeof
(
WCHAR
)
);
wDesc
[(
sizeof
(
wDesc
)
/
sizeof
(
WCHAR
))
-
1
]
=
'\0'
;
MultiByteToWideChar
(
CP_ACP
,
0
,
desc
.
szDrvname
,
-
1
,
wName
,
sizeof
(
wName
)
/
sizeof
(
WCHAR
)
);
wName
[(
sizeof
(
wName
)
/
sizeof
(
WCHAR
))
-
1
]
=
'\0'
;
if
(
lpDSEnumCallback
(
&
DSOUND_capture_guids
[
wid
],
wDesc
,
wName
,
lpContext
)
==
FALSE
)
return
DS_OK
;
}
...
...
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