[vlc-commits] win32: fix integer underflow in vlc_timer_schedule()

Rémi Denis-Courmont git at videolan.org
Sat May 28 15:43:31 CEST 2016


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat May 28 16:42:52 2016 +0300| [4dae25442f7a5f10c87d2331b553766b1259360b] | committer: Rémi Denis-Courmont

win32: fix integer underflow in vlc_timer_schedule()

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4dae25442f7a5f10c87d2331b553766b1259360b
---

 src/win32/thread.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/win32/thread.c b/src/win32/thread.c
index 2480f9e..01a8a46 100644
--- a/src/win32/thread.c
+++ b/src/win32/thread.c
@@ -1075,7 +1075,11 @@ void vlc_timer_schedule (vlc_timer_t timer, bool absolute,
         return; /* Disarm */
 
     if (absolute)
+    {
         value -= mdate ();
+        if (value < 0)
+            value = 0;
+    }
     value = (value + 999) / 1000;
     interval = (interval + 999) / 1000;
 



More information about the vlc-commits mailing list