diff options
author | Hauke Mehrtens <hauke@openwrt.org> | 2014-03-30 19:29:12 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@openwrt.org> | 2014-03-30 19:29:12 +0000 |
commit | 05b8b81fba76ca7a6e8aa84b9d2a93f7faea810b (patch) | |
tree | dcd2e026ed3f6b7e57263bba06fb58c575053c25 | |
parent | b55b2d43a0f88348844bcc58aad4d3314f7c6e14 (diff) | |
download | upstream-05b8b81fba76ca7a6e8aa84b9d2a93f7faea810b.tar.gz upstream-05b8b81fba76ca7a6e8aa84b9d2a93f7faea810b.tar.bz2 upstream-05b8b81fba76ca7a6e8aa84b9d2a93f7faea810b.zip |
odhcp6c: fix integer overflow after 50 days
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@40348 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | package/odhcp6c/Makefile | 2 | ||||
-rw-r--r-- | package/odhcp6c/patches/001-fix-integer-overflow-after-50-days.patch | 25 |
2 files changed, 26 insertions, 1 deletions
diff --git a/package/odhcp6c/Makefile b/package/odhcp6c/Makefile index e37b72e109..e767064951 100644 --- a/package/odhcp6c/Makefile +++ b/package/odhcp6c/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=odhcp6c PKG_VERSION:=2013-10-02 -PKG_RELEASE=$(PKG_SOURCE_VERSION) +PKG_RELEASE=$(PKG_SOURCE_VERSION)-1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) diff --git a/package/odhcp6c/patches/001-fix-integer-overflow-after-50-days.patch b/package/odhcp6c/patches/001-fix-integer-overflow-after-50-days.patch new file mode 100644 index 0000000000..292d023ab2 --- /dev/null +++ b/package/odhcp6c/patches/001-fix-integer-overflow-after-50-days.patch @@ -0,0 +1,25 @@ +From 5b98f902f616bd9b96a2128587bc6995555a43c1 Mon Sep 17 00:00:00 2001 +From: Steven Barth <steven@midlink.org> +Date: Fri, 7 Mar 2014 10:33:49 +0100 +Subject: [PATCH] fix integer overflow after 50 days (thx Hauke Mehrtens) + +--- + src/odhcp6c.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/odhcp6c.c b/src/odhcp6c.c +index 3c6b3b0..ba11ced 100644 +--- a/src/odhcp6c.c ++++ b/src/odhcp6c.c +@@ -470,7 +470,7 @@ uint64_t odhcp6c_get_milli_time(void) + { + struct timespec t = {0, 0}; + syscall(SYS_clock_gettime, CLOCK_MONOTONIC, &t); +- return t.tv_sec * 1000 + t.tv_nsec / 1000000; ++ return ((uint64_t)t.tv_sec) * 1000 + ((uint64_t)t.tv_nsec) / 1000000; + } + + +-- +1.7.10.4 + |