Module: wine Branch: master Commit: a924e54c94c2aa7fe749bb1b46be74d77758a5f6 URL: http://source.winehq.org/git/wine.git/?a=commit;h=a924e54c94c2aa7fe749bb1b46...
Author: Vincent Povirk vincent@codeweavers.com Date: Wed Apr 14 12:26:12 2010 -0500
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);