Module: wine Branch: master Commit: 4c36e12be6fdc1afc6431df3f930715f587ef757 URL: http://source.winehq.org/git/wine.git/?a=commit;h=4c36e12be6fdc1afc6431df3f9...
Author: Henri Verbeet hverbeet@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)