dsound: Ensure device name and description buffers are NUL terminated

William Waghorn willw at litany.me.uk
Sat Mar 20 18:30:01 CDT 2010


SoundBlaster Live! sound cards have an Alsa device name of "ADC Capture/Standard PCM Playback", which is too long to fit in the DirectSound buffer allocated for this purpose.  While the name is truncated by MultiByteToWideChar(), it will omit the terminating NUL.  Some programs expect this NUL, and will display garbage after the truncated name.

The appended patch ensures that the DirectSound device names and descriptions obtained from winealsa.drv are terminated with a NUL character.

Regards,

William
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0002-dsound-Ensure-device-name-and-description-buffers-a.txt
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20100320/1a0edf70/attachment.txt>


More information about the wine-patches mailing list