You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2021/08/04 13:42:22 UTC

[qpid-proton] branch main updated: Fix integer overflow in pn_proactor_now_64 while compiling 32-bits

This is an automated email from the ASF dual-hosted git repository.

astitcher pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git


The following commit(s) were added to refs/heads/main by this push:
     new d73948e  Fix integer overflow in pn_proactor_now_64 while compiling 32-bits
d73948e is described below

commit d73948ea4897dd9cdea600914c722fe0c7c027f3
Author: Martijn Fennema <ma...@intraffic.nl>
AuthorDate: Wed Aug 4 10:30:13 2021 +0200

    Fix integer overflow in pn_proactor_now_64 while compiling 32-bits
---
 c/src/proactor/epoll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/c/src/proactor/epoll.c b/c/src/proactor/epoll.c
index 52e05c1..1adaeb3 100644
--- a/c/src/proactor/epoll.c
+++ b/c/src/proactor/epoll.c
@@ -2887,5 +2887,5 @@ pn_millis_t pn_proactor_now(void) {
 int64_t pn_proactor_now_64(void) {
   struct timespec t;
   clock_gettime(CLOCK_MONOTONIC, &t);
-  return t.tv_sec * 1000 + t.tv_nsec / 1000000;
+  return ((int64_t)t.tv_sec) * 1000 + t.tv_nsec / 1000000;
 }

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org