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
55fca777
Commit
55fca777
authored
Oct 03, 2009
by
Jörg Höhle
Committed by
Alexandre Julliard
Oct 05, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineoss: Fix the buffer size check for more than 2 channels.
parent
376f74b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
audio.c
dlls/wineoss.drv/audio.c
+4
-2
No files found.
dlls/wineoss.drv/audio.c
View file @
55fca777
...
@@ -2169,6 +2169,7 @@ static DWORD wodClose(WORD wDevID)
...
@@ -2169,6 +2169,7 @@ static DWORD wodClose(WORD wDevID)
*/
*/
static
DWORD
wodWrite
(
WORD
wDevID
,
LPWAVEHDR
lpWaveHdr
,
DWORD
dwSize
)
static
DWORD
wodWrite
(
WORD
wDevID
,
LPWAVEHDR
lpWaveHdr
,
DWORD
dwSize
)
{
{
WORD
delta
;
TRACE
(
"(%u, %p, %08X);
\n
"
,
wDevID
,
lpWaveHdr
,
dwSize
);
TRACE
(
"(%u, %p, %08X);
\n
"
,
wDevID
,
lpWaveHdr
,
dwSize
);
/* first, do the sanity checks... */
/* first, do the sanity checks... */
...
@@ -2187,10 +2188,11 @@ static DWORD wodWrite(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
...
@@ -2187,10 +2188,11 @@ static DWORD wodWrite(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
lpWaveHdr
->
dwFlags
|=
WHDR_INQUEUE
;
lpWaveHdr
->
dwFlags
|=
WHDR_INQUEUE
;
lpWaveHdr
->
lpNext
=
0
;
lpWaveHdr
->
lpNext
=
0
;
if
((
lpWaveHdr
->
dwBufferLength
&
(
WOutDev
[
wDevID
].
waveFormat
.
Format
.
nBlockAlign
-
1
))
!=
0
)
delta
=
lpWaveHdr
->
dwBufferLength
%
WOutDev
[
wDevID
].
waveFormat
.
Format
.
nBlockAlign
;
if
(
delta
!=
0
)
{
{
WARN
(
"WaveHdr length isn't a multiple of the PCM block size: %d %% %d
\n
"
,
lpWaveHdr
->
dwBufferLength
,
WOutDev
[
wDevID
].
waveFormat
.
Format
.
nBlockAlign
);
WARN
(
"WaveHdr length isn't a multiple of the PCM block size: %d %% %d
\n
"
,
lpWaveHdr
->
dwBufferLength
,
WOutDev
[
wDevID
].
waveFormat
.
Format
.
nBlockAlign
);
lpWaveHdr
->
dwBufferLength
&=
~
(
WOutDev
[
wDevID
].
waveFormat
.
Format
.
nBlockAlign
-
1
)
;
lpWaveHdr
->
dwBufferLength
-=
delta
;
}
}
OSS_AddRingMessage
(
&
WOutDev
[
wDevID
].
msgRing
,
WINE_WM_HEADER
,
(
DWORD_PTR
)
lpWaveHdr
,
FALSE
);
OSS_AddRingMessage
(
&
WOutDev
[
wDevID
].
msgRing
,
WINE_WM_HEADER
,
(
DWORD_PTR
)
lpWaveHdr
,
FALSE
);
...
...
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