Signed-off-by: Eric Pouech eric.pouech@gmail.com
Supersedes 230982
--- dlls/mciwave/mciwave.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/mciwave/mciwave.c b/dlls/mciwave/mciwave.c index 1d9abce84a3..3ca884ed6e0 100644 --- a/dlls/mciwave/mciwave.c +++ b/dlls/mciwave/mciwave.c @@ -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; }