Skip to content

Commit

Permalink
MT#55283 fix unsigned integer underflow
Browse files Browse the repository at this point in the history
The packet timestamp might be larger than our own "now" timestamp

Change-Id: I891dc1b6d191689980cce8e285c8f519f990c35d
  • Loading branch information
rfuchs committed Jul 25, 2024
1 parent d48f4f3 commit 91f7b29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion daemon/call.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ static void call_timer_iterator(call_t *c, struct iterator_helper *hlp) {
tmp_t_reason = OFFER_TIMEOUT;
}

if (rtpe_now.tv_sec - timestamp < check)
if (timestamp < rtpe_now.tv_sec || rtpe_now.tv_sec - timestamp < check)
good = true;

next:
Expand Down

0 comments on commit 91f7b29

Please sign in to comment.