winmm/tests: waveOutGetDevCaps called with invalid size
reif at earthlink.net
Mon Apr 21 17:18:25 CDT 2008
Peter Åstrand wrote:
> On Fri, 18 Apr 2008, Robert Reif wrote:
>>> - rc=waveOutGetDevCapsA(device,&capsA,4);
>>> + /* Final call must succeed, capsA will be used below */
>>> + rc=waveOutGetDevCapsA(device,&capsA,sizeof(capsA));
>>> "waveOutGetDevCapsA(%s): MMSYSERR_NOERROR expected, got %s\n",
>>> - rc=waveOutGetDevCapsW(device,&capsW,4);
>>> - ok(rc==MMSYSERR_NOERROR || rc==MMSYSERR_NOTSUPPORTED,
>>> - "waveOutGetDevCapsW(%s): MMSYSERR_NOERROR or MMSYSERR_NOTSUPPORTED "
>>> - "expected, got %s\n",dev_name(device),wave_out_error(rc));
>>> + if (rc!=MMSYSERR_NOERROR)
>>> + return;
>> That's the whole point of the test, to check what happens with an invalid
> So what do you think *should* happen with an invalid argument? The result
> is different on different Windows platforms. The behaviour is not
> specified by MSDN.
> In any case, continuing and executing code that uses "capsA" even though
> the waveOutGetDevCapsA call failed is definitely wrong.
> Peter Åstrand ThinLinc Chief Developer
> Cendio AB http://www.cendio.se
> Wallenbergs gata 4
> 583 30 Linköping Phone: +46-13-21 46 00
This is the proper fix:
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the wine-devel