From a8da34764891e656e2df9c0cf22ed12ca1c14871 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Wed, 14 Apr 2010 12:26:12 -0500 Subject: [PATCH 2/2] windowscodecs: Fix uninitialized variable use in StreamOnMemory_Write. --- dlls/windowscodecs/stream.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/dlls/windowscodecs/stream.c b/dlls/windowscodecs/stream.c index 24eaf87..bd5592b 100644 --- a/dlls/windowscodecs/stream.c +++ b/dlls/windowscodecs/stream.c @@ -125,11 +125,9 @@ static HRESULT WINAPI StreamOnMemory_Write(IStream *iface, hr = STG_E_MEDIUMFULL; } else { - if (cb) { - memcpy(This->pbMemory + This->dwCurPos, pv, cb); - This->dwCurPos += cb; - hr = S_OK; - } + memcpy(This->pbMemory + This->dwCurPos, pv, cb); + This->dwCurPos += cb; + hr = S_OK; if (pcbWritten) *pcbWritten = cb; } LeaveCriticalSection(&This->lock); -- 1.6.3.3