From e87c53bb55c5adb3e8ee319a85bcf1b42143e269 Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Fri, 29 Apr 2022 11:58:10 +0200 Subject: [PATCH] defrag: use util function for timeout To fix timestamp overflow as found by oss-fuzz https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=44608 fixu --- src/defrag.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/defrag.c b/src/defrag.c index 992d0205c2..a096ea58d8 100644 --- a/src/defrag.c +++ b/src/defrag.c @@ -628,8 +628,7 @@ DefragInsertFrag(ThreadVars *tv, DecodeThreadVars *dtv, DefragTracker *tracker, } /* Update timeout. */ - tracker->timeout.tv_sec = p->ts.tv_sec + tracker->host_timeout; - tracker->timeout.tv_usec = p->ts.tv_usec; + tracker->timeout = TimevalWithSeconds(&p->ts, tracker->host_timeout); Frag *prev = NULL, *next = NULL; bool overlap = false;