quartz: Don't use uninitialized memory in ACMWrapper

Chris Robinson chris.kcat at gmail.com
Sun Feb 18 00:17:32 CST 2007


-------------- next part --------------
From d115afaf9c2fce7a69ab7e944d4e9b8fa6d57904 Mon Sep 17 00:00:00 2001
From: Chris Robinson <chris.kcat at gmail.com>
Date: Sat, 17 Feb 2007 22:11:47 -0800
Subject: [PATCH] quartz: Don't use uninitialized memory in ACMWrapper

---
 dlls/quartz/acmwrapper.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/quartz/acmwrapper.c b/dlls/quartz/acmwrapper.c
index 62f0020..4b2d143 100644
--- a/dlls/quartz/acmwrapper.c
+++ b/dlls/quartz/acmwrapper.c
@@ -91,7 +91,7 @@ static HRESULT ACMWrapper_ProcessSampleData(TransformFilterImpl* pTransformFilte
 	This->current_size += copy_size;
 	offset += copy_size;
 
-	if (offset == size)
+	if (offset >= size)
 	    stop = TRUE;
 	if (This->current_size < This->max_size)
 	    break;
@@ -256,8 +256,8 @@ HRESULT ACMWrapper_create(IUnknown * pUnkOuter, LPVOID * ppv)
 
     /* Note: This memory is managed by the transform filter once created */
     This = CoTaskMemAlloc(sizeof(ACMWrapperImpl));
+    ZeroMemory(This, sizeof(ACMWrapperImpl));
 
-    This->has = 0;
     This->reinit_codec = TRUE;
 
     hr = TransformFilter_Create(&(This->tf), &CLSID_ACMWrapper, &ACMWrapper_FuncsTable);
-- 
1.4.4.4



More information about the wine-patches mailing list