table: prevent integer overflow in pit::FaceRecord
refs #4979
Change-Id: Iacd5abdfc8ae4530364e3fa590778a234140b7ed
diff --git a/daemon/fw/forwarder.cpp b/daemon/fw/forwarder.cpp
index 67b8f52..55a9062 100644
--- a/daemon/fw/forwarder.cpp
+++ b/daemon/fw/forwarder.cpp
@@ -574,7 +574,7 @@
Forwarder::setExpiryTimer(const shared_ptr<pit::Entry>& pitEntry, time::milliseconds duration)
{
BOOST_ASSERT(pitEntry);
- BOOST_ASSERT(duration >= 0_ms);
+ duration = std::max(duration, 0_ms);
pitEntry->expiryTimer.cancel();
pitEntry->expiryTimer = getScheduler().schedule(duration, [=] { onInterestFinalize(pitEntry); });