winealsa.drv: mixer.c: Don't write uninitialized variable to buffer

Zac Brown zac at zacbrown.org
Fri Jun 6 15:57:52 CDT 2008


Initialize variable to zero to keep from writing trash(possibly) to buffer.

Found via valgrind:
Syscall param write(buf) points to uninitialised byte(s)
      at  (within /lib/ld-2.7.so)
      by  ALSA_mxdMessage (mixer.c:1549)
      by  MMDRV_Message (lolvldrv.c:164)
      by  MMDRV_Close (lolvldrv.c:352)
      by  mixerClose (winmm.c:401)
      by  mixer_test_deviceA (mixer.c:551)
      by  mixer_testsA (mixer.c:986)
      by  func_mixer (mixer.c:1019)
      by  run_test (test.h:421)
      by  main (test.h:470)
    Address 0x7f21fa40 is on thread 1's stack
    Uninitialised value was created by a stack allocation
      at  MIX_Close (mixer.c:764)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winealsa-init-buffer-zero.patch
Type: text/x-patch
Size: 0 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080606/57d5ae11/attachment.bin 


More information about the wine-patches mailing list