winmm: fix WOD_Open() WAVE_MAPPER no-device case.

Fabrice Bauzac libnoon at
Mon Aug 19 22:57:34 CDT 2013


This patch intends to fix the bug:

The bug: basically, when there is no sound device and the user tries
to WOD_Open() the WAVE_MAPPER pseudodevice, the code calls read_map()
with device index 0 without first checking whether the number of
devices is greater than 0.

The patch checks the number of devices and if there is none, returns

I'm not sure whether this is the most appropriate errorcode.  According to
the MMSYSERR_NODRIVER errorcode could also be appropriate.

I have checked the patch on the bugging application and it fixes the crash.


Best regards
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-winmm-fix-WOD_Open-WAVE_MAPPER-no-device-case.patch
Type: application/octet-stream
Size: 945 bytes
Desc: not available
URL: <>

More information about the wine-patches mailing list