avifil32: Properly check the required buffer size in AVIFILE_ReadBlock().
This commit is contained in:
parent
f5c8153edd
commit
4c36e12be6
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue