From 1d9a3f6d12322891a2af4aadd66a92ea66479233 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Krej=C4=8D=C3=AD?= Date: Wed, 29 May 2019 08:42:10 +0200 Subject: [PATCH] mciqtz32: Don't overflow seek times during multiplication. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Seek times are of type REFERENCE_TIME (64-bit), but the multiplication is done in DWORD (32-bit). Signed-off-by: Lukáš Krejčí Signed-off-by: Alexandre Julliard --- dlls/mciqtz32/mciqtz.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/dlls/mciqtz32/mciqtz.c b/dlls/mciqtz32/mciqtz.c index 1aec32635b2..ec4a8b531a0 100644 --- a/dlls/mciqtz32/mciqtz.c +++ b/dlls/mciqtz32/mciqtz.c @@ -422,20 +422,19 @@ static DWORD MCIQTZ_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms wma->mci_flags = dwFlags; IMediaSeeking_GetTimeFormat(wma->seek, &format); if (dwFlags & MCI_FROM) { + wma->seek_start = lpParms->dwFrom; if (IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME)) - wma->seek_start = lpParms->dwFrom * 10000; - else - wma->seek_start = lpParms->dwFrom; + wma->seek_start *= 10000; + start_flags = AM_SEEKING_AbsolutePositioning; } else { wma->seek_start = 0; start_flags = AM_SEEKING_NoPositioning; } if (dwFlags & MCI_TO) { + wma->seek_stop = lpParms->dwTo; if (IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME)) - wma->seek_stop = lpParms->dwTo * 10000; - else - wma->seek_stop = lpParms->dwTo; + wma->seek_stop *= 10000; } else { wma->seek_stop = 0; IMediaSeeking_GetDuration(wma->seek, &wma->seek_stop);