[PATCH] winealsa.drv: Fixed bad sizeof (pointer vs struct) (Coverity)

Marcus Meissner marcus at jet.franken.de
Mon Mar 14 02:36:47 CDT 2011


Hi,

spotted by Joerg, Coverity did not see it.
(which might be Amine does not build ALSA).

Ciao, Marcus
---
 dlls/winealsa.drv/alsa.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/winealsa.drv/alsa.c b/dlls/winealsa.drv/alsa.c
index 0b244fa..ca775a2 100644
--- a/dlls/winealsa.drv/alsa.c
+++ b/dlls/winealsa.drv/alsa.c
@@ -351,7 +351,7 @@ void ALSA_copyFormat(LPWAVEFORMATEX wf1, LPWAVEFORMATPCMEX wf2)
 {
     unsigned int iLength;
 
-    ZeroMemory(wf2, sizeof(wf2));
+    ZeroMemory(wf2, sizeof(*wf2));
     if (wf1->wFormatTag == WAVE_FORMAT_PCM)
         iLength = sizeof(PCMWAVEFORMAT);
     else if (wf1->wFormatTag == WAVE_FORMAT_EXTENSIBLE)
-- 
1.7.3.4



More information about the wine-patches mailing list