[glib/glib-2-28] Bug 642052 - g_timeout_add(_seconds) overflow



commit 78c8f5cc69f8b70333726b989db06c1e91a7a749
Author: Ryan Lortie <desrt desrt ca>
Date:   Mon Feb 14 23:21:14 2011 -0500

    Bug 642052 - g_timeout_add(_seconds) overflow
    
    Fix integer overflow error.

 glib/gmain.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/glib/gmain.c b/glib/gmain.c
index 46752f7..1af9a5c 100644
--- a/glib/gmain.c
+++ b/glib/gmain.c
@@ -3796,7 +3796,8 @@ static void
 g_timeout_set_expiration (GTimeoutSource *timeout_source,
                           gint64          current_time)
 {
-  timeout_source->expiration = current_time + timeout_source->interval * 1000;
+  timeout_source->expiration = current_time +
+                               (guint64) timeout_source->interval * 1000;
 
   if (timeout_source->seconds)
     {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]