winmm: mixerGetLineInfoA wrapper shouldn't convert strings on failure

Dan Kegel dank at kegel.com
Sat Jun 14 18:06:08 CDT 2008


[Yet another post-1.0 patch.  I'll resend them after 1.0 is out.]

If the call fails, the strings aren't set, so don't try
to convert them.
Added a test to verify this for at least the MMSYSERR_INVALFLAG
case, and made sure it passed on XP.

Fixes 27 valgrind warnings like

Conditional jump or move depends on uninitialised value(s)
   at strlenW (unicode.h:212)
   by WideCharToMultiByte (locale.c:1902)
   by mixerGetLineInfoA (winmm.c:664)
   by mixer_test_deviceA (mixer.c:398)
 Uninitialised value was created by a stack allocation
   at mixerGetLineInfoA (winmm.c:617)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmm-mixer.patch
Type: text/x-diff
Size: 2788 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080614/35878f26/attachment.patch 


More information about the wine-patches mailing list