winmm: mixerGetLineInfoA wrapper shouldn't convert strings on failure (resend)

Dan Kegel dank at kegel.com
Thu Jun 26 22:28:26 CDT 2008


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/20080626/c487884e/attachment.patch 


More information about the wine-patches mailing list