diff --git a/devel/tevent/Makefile b/devel/tevent/Makefile index ef6e4b8a1812..7ac5b1d05f18 100644 --- a/devel/tevent/Makefile +++ b/devel/tevent/Makefile @@ -1,6 +1,6 @@ PORTNAME= tevent DISTVERSION= 0.15.0 -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 0 CATEGORIES= devel MASTER_SITES= SAMBA diff --git a/devel/tevent/files/patch-tevent__poll.c b/devel/tevent/files/patch-tevent__poll.c new file mode 100644 index 000000000000..fe285a375ca6 --- /dev/null +++ b/devel/tevent/files/patch-tevent__poll.c @@ -0,0 +1,18 @@ +--- tevent_poll.c.orig 2026-08-09 16:32:38 UTC ++++ tevent_poll.c +@@ -470,8 +470,13 @@ static int poll_event_loop_poll(struct tevent_context + } + + if (tvalp != NULL) { +- timeout = tvalp->tv_sec * 1000; +- timeout += (tvalp->tv_usec + 999) / 1000; ++ /* clamp: far-future timer overflows int ms -> poll(2) EINVAL busy-loop */ ++ if (tvalp->tv_sec > (INT_MAX / 1000) - 1) { ++ timeout = INT_MAX; ++ } else { ++ timeout = tvalp->tv_sec * 1000; ++ timeout += (tvalp->tv_usec + 999) / 1000; ++ } + } + + ok = poll_event_sync_arrays(ev, poll_ev);