Anton Baskanov : winegstreamer: Fix integer overflow in scale_uint64.

Alexandre Julliard julliard at winehq.org
Mon Apr 26 15:51:32 CDT 2021


Module: wine
Branch: master
Commit: ad5342b87c1cb1697f6a801f6284ee8fc0657ac9
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=ad5342b87c1cb1697f6a801f6284ee8fc0657ac9

Author: Anton Baskanov <baskanov at gmail.com>
Date:   Mon Apr 26 09:51:22 2021 +0700

winegstreamer: Fix integer overflow in scale_uint64.

Signed-off-by: Anton Baskanov <baskanov at gmail.com>
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/winegstreamer/quartz_parser.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/winegstreamer/quartz_parser.c b/dlls/winegstreamer/quartz_parser.c
index 243dc9f80ba..fbc9fd32628 100644
--- a/dlls/winegstreamer/quartz_parser.c
+++ b/dlls/winegstreamer/quartz_parser.c
@@ -597,8 +597,8 @@ static uint64_t scale_uint64(uint64_t value, uint32_t numerator, uint32_t denomi
         return 0;
 
     i.QuadPart = value;
-    low.QuadPart = i.u.LowPart * numerator;
-    high.QuadPart = i.u.HighPart * numerator + low.u.HighPart;
+    low.QuadPart = (ULONGLONG)i.u.LowPart * numerator;
+    high.QuadPart = (ULONGLONG)i.u.HighPart * numerator + low.u.HighPart;
     low.u.HighPart = 0;
 
     if (high.u.HighPart >= denominator)




More information about the wine-cvs mailing list