gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libmicrohttpd] branch master updated: fix COV 164298: inte


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] branch master updated: fix COV 164298: integer overflow on multiplying timeout
Date: Fri, 10 Mar 2017 16:36:15 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository libmicrohttpd.

The following commit(s) were added to refs/heads/master by this push:
     new 2123decd fix COV 164298: integer overflow on multiplying timeout
2123decd is described below

commit 2123decd504e9fe024db7efba6d199b3457c7ad9
Author: Christian Grothoff <address@hidden>
AuthorDate: Fri Mar 10 16:37:57 2017 +0100

    fix COV 164298: integer overflow on multiplying timeout
---
 ChangeLog               | 4 ++++
 src/microhttpd/daemon.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index e3b9c29f..8abaf589 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Fri Mar 10 16:37:12 CET 2017
+       Fix hypothetical integer overflow for very, very large
+       timeout values. -CG
+
 Fri Mar 10 16:22:54 CET 2017
        Handle case that we do not listen at all more gracefully
        in MHD_start_daemon() and not pass '-1' to helper functions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 680a9b99..98f17192 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -3131,7 +3131,7 @@ MHD_get_timeout (struct MHD_Daemon *daemon,
       if (second_left > ULLONG_MAX / 1000)
         *timeout = ULLONG_MAX;
       else
-        *timeout = 1000 * second_left;
+        *timeout = 1000LL * second_left;
   }
   return MHD_YES;
 }

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]