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
e55a7029
Commit
e55a7029
authored
Sep 03, 2008
by
Jeff Zaroyko
Committed by
Alexandre Julliard
Sep 05, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound: Check for invalid parameter when unlocking secondary buffers.
parent
aacfc6ed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
buffer.c
dlls/dsound/buffer.c
+6
-1
ds3d.c
dlls/dsound/tests/ds3d.c
+3
-0
No files found.
dlls/dsound/buffer.c
View file @
e55a7029
...
...
@@ -735,7 +735,12 @@ static HRESULT WINAPI IDirectSoundBufferImpl_Unlock(
{
RtlAcquireResourceShared
(
&
iter
->
lock
,
TRUE
);
if
(
x1
)
DSOUND_MixToTemporary
(
iter
,
(
DWORD_PTR
)
p1
-
(
DWORD_PTR
)
iter
->
buffer
->
memory
,
x1
,
FALSE
);
{
if
(
x1
+
(
DWORD_PTR
)
p1
-
(
DWORD_PTR
)
iter
->
buffer
->
memory
>
iter
->
buflen
)
hres
=
DSERR_INVALIDPARAM
;
else
DSOUND_MixToTemporary
(
iter
,
(
DWORD_PTR
)
p1
-
(
DWORD_PTR
)
iter
->
buffer
->
memory
,
x1
,
FALSE
);
}
if
(
x2
)
DSOUND_MixToTemporary
(
iter
,
0
,
x2
,
FALSE
);
RtlReleaseResource
(
&
iter
->
lock
);
...
...
dlls/dsound/tests/ds3d.c
View file @
e55a7029
...
...
@@ -197,6 +197,9 @@ static int buffer_refill(play_state_t* state, DWORD size)
state
->
written
+=
len2
;
}
state
->
offset
=
state
->
written
%
state
->
buffer_size
;
/* some apps blindly pass &ptr1 instead of ptr1 */
rc
=
IDirectSoundBuffer_Unlock
(
state
->
dsbo
,
&
ptr1
,
len1
,
ptr2
,
len2
);
ok
(
rc
==
DSERR_INVALIDPARAM
,
"IDDirectSoundBuffer_Unlock(): expected %08x got %08x, %p %p
\n
"
,
DSERR_INVALIDPARAM
,
rc
,
&
ptr1
,
ptr1
);
rc
=
IDirectSoundBuffer_Unlock
(
state
->
dsbo
,
ptr1
,
len1
,
ptr2
,
len2
);
ok
(
rc
==
DS_OK
,
"IDirectSoundBuffer_Unlock() failed: %08x
\n
"
,
rc
);
if
(
rc
!=
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