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
c89853eb
Commit
c89853eb
authored
Mar 09, 2010
by
Jörg Höhle
Committed by
Alexandre Julliard
May 19, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm: More MIDI boundary tests & fixes.
parent
a311dff7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
midi.c
dlls/winmm/tests/midi.c
+0
-0
winmm.c
dlls/winmm/winmm.c
+16
-1
No files found.
dlls/winmm/tests/midi.c
View file @
c89853eb
This diff is collapsed.
Click to expand it.
dlls/winmm/winmm.c
View file @
c89853eb
...
...
@@ -911,6 +911,13 @@ UINT WINAPI midiOutOpen(LPHMIDIOUT lphMidiOut, UINT uDeviceID,
if
(
lphMidiOut
!=
NULL
)
*
lphMidiOut
=
0
;
switch
(
dwFlags
&
CALLBACK_TYPEMASK
)
{
case
CALLBACK_WINDOW
:
if
(
dwCallback
&&
!
IsWindow
((
HWND
)
dwCallback
))
return
MMSYSERR_INVALPARAM
;
break
;
}
lpwm
=
MIDI_OutAlloc
(
&
hMidiOut
,
&
dwCallback
,
&
dwInstance
,
&
dwFlags
,
0
,
NULL
);
if
(
lpwm
==
NULL
)
...
...
@@ -1754,6 +1761,13 @@ MMRESULT WINAPI midiStreamOpen(HMIDISTRM* lphMidiStrm, LPUINT lpuDeviceID,
if
(
cMidi
!=
1
||
lphMidiStrm
==
NULL
||
lpuDeviceID
==
NULL
)
return
MMSYSERR_INVALPARAM
;
switch
(
fdwOpen
&
CALLBACK_TYPEMASK
)
{
case
CALLBACK_WINDOW
:
if
(
dwCallback
&&
!
IsWindow
((
HWND
)
dwCallback
))
return
MMSYSERR_INVALPARAM
;
break
;
}
lpMidiStrm
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WINE_MIDIStream
));
if
(
!
lpMidiStrm
)
return
MMSYSERR_NOMEM
;
...
...
@@ -1816,7 +1830,8 @@ MMRESULT WINAPI midiStreamOut(HMIDISTRM hMidiStrm, LPMIDIHDR lpMidiHdr,
TRACE
(
"(%p, %p, %u)!
\n
"
,
hMidiStrm
,
lpMidiHdr
,
cbMidiHdr
);
if
(
cbMidiHdr
<
offsetof
(
MIDIHDR
,
dwOffset
)
||
!
lpMidiHdr
||
!
lpMidiHdr
->
lpData
||
lpMidiHdr
->
dwBufferLength
<
lpMidiHdr
->
dwBytesRecorded
)
||
lpMidiHdr
->
dwBufferLength
<
lpMidiHdr
->
dwBytesRecorded
||
lpMidiHdr
->
dwBytesRecorded
%
4
/* player expects DWORD padding */
)
return
MMSYSERR_INVALPARAM
;
/* FIXME: Native additionally checks if the MIDIEVENTs in lpData
* exactly fit dwBytesRecorded. */
...
...
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