Commit 90ecf27d authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

mciwave: Correctly handle error return status from mmioRead.

parent 684944f0
......@@ -291,7 +291,7 @@ static DWORD WAVE_mciReadFmt(WINE_MCIWAVE* wmw, const MMCKINFO* pckMainRIFF)
if (!pwfx) return MCIERR_OUT_OF_MEMORY;
r = mmioRead(wmw->hFile, (HPSTR)pwfx, mmckInfo.cksize);
if (r < sizeof(PCMWAVEFORMAT)) {
if (r < 0 || r < sizeof(PCMWAVEFORMAT)) {
HeapFree(GetProcessHeap(), 0, pwfx);
return MCIERR_INVALID_FILE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment