From 085c04709ba502c74c0bfb9ca777abe579ceedce Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Sun, 17 Feb 2008 23:46:48 +0000 Subject: [PATCH] 2333. [bug] Fix off by one error in isc_time_nowplusinterval(). [RT #17608] --- lib/isc/unix/time.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/isc/unix/time.c b/lib/isc/unix/time.c index 70fd2e1867..245b15821a 100644 --- a/lib/isc/unix/time.c +++ b/lib/isc/unix/time.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: time.c,v 1.54 2007/06/18 23:47:48 tbox Exp $ */ +/* $Id: time.c,v 1.54.128.1 2008/02/17 23:46:48 marka Exp $ */ /*! \file */ @@ -227,7 +227,7 @@ isc_time_nowplusinterval(isc_time_t *t, const isc_interval_t *i) { t->seconds = tv.tv_sec + i->seconds; t->nanoseconds = tv.tv_usec * NS_PER_US + i->nanoseconds; - if (t->nanoseconds > NS_PER_S) { + if (t->nanoseconds >= NS_PER_S) { t->seconds++; t->nanoseconds -= NS_PER_S; }