Henri Verbeet : avifil32: Properly check the required buffer size in AVIFILE_ReadBlock().

Alexandre Julliard julliard at winehq.org
Tue Jan 5 11:37:51 CST 2010


Module: wine
Branch: master
Commit: 4c36e12be6fdc1afc6431df3f930715f587ef757
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4c36e12be6fdc1afc6431df3f930715f587ef757

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Mon Jan  4 21:33:12 2010 +0100

avifil32: Properly check the required buffer size in AVIFILE_ReadBlock().

---

 dlls/avifil32/avifile.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/avifil32/avifile.c b/dlls/avifil32/avifile.c
index 49e141f..2486611 100644
--- a/dlls/avifil32/avifile.c
+++ b/dlls/avifil32/avifile.c
@@ -2027,7 +2027,7 @@ static HRESULT AVIFILE_ReadBlock(IAVIStreamImpl *This, DWORD pos,
     size += 2 * sizeof(DWORD);
 
     /* check that buffer is big enough -- don't trust dwSuggestedBufferSize */
-    if (This->lpBuffer == NULL || size < This->cbBuffer) {
+    if (This->lpBuffer == NULL || This->cbBuffer < size) {
       DWORD maxSize = max(size, This->sInfo.dwSuggestedBufferSize);
 
       if (This->lpBuffer == NULL)




More information about the wine-cvs mailing list