winegstreamer: Fix integer overflow in scale_uint64.

Signed-off-by: Anton Baskanov <baskanov@gmail.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Anton Baskanov 2021-04-26 09:51:22 +07:00 committed by Alexandre Julliard
parent 7d7b8e2a88
commit ad5342b87c
1 changed files with 2 additions and 2 deletions

View File

@ -597,8 +597,8 @@ static uint64_t scale_uint64(uint64_t value, uint32_t numerator, uint32_t denomi
return 0; return 0;
i.QuadPart = value; i.QuadPart = value;
low.QuadPart = i.u.LowPart * numerator; low.QuadPart = (ULONGLONG)i.u.LowPart * numerator;
high.QuadPart = i.u.HighPart * numerator + low.u.HighPart; high.QuadPart = (ULONGLONG)i.u.HighPart * numerator + low.u.HighPart;
low.u.HighPart = 0; low.u.HighPart = 0;
if (high.u.HighPart >= denominator) if (high.u.HighPart >= denominator)