From: bluhm Date: Tue, 6 Jan 2015 11:27:35 +0000 (+0000) Subject: Apply commit 2d8cf0b720cdd5f9f292f174a10ff74e62a380ec from upstream. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=9e85ff02a3e0929411058bcec3b3f4f6093948be;p=openbsd Apply commit 2d8cf0b720cdd5f9f292f174a10ff74e62a380ec from upstream. - Defensive programming to prevent (hopefully impossible) stack-stomping OK nicm@ --- diff --git a/lib/libevent/event.c b/lib/libevent/event.c index c1aa42ebc78..57dc365f8d1 100644 --- a/lib/libevent/event.c +++ b/lib/libevent/event.c @@ -1,4 +1,4 @@ -/* $OpenBSD: event.c,v 1.36 2014/10/30 16:45:37 bluhm Exp $ */ +/* $OpenBSD: event.c,v 1.37 2015/01/06 11:27:35 bluhm Exp $ */ /* * Copyright (c) 2000-2004 Niels Provos @@ -348,9 +348,12 @@ event_process_active(struct event_base *base) ncalls--; ev->ev_ncalls = ncalls; (*ev->ev_callback)((int)ev->ev_fd, ev->ev_res, ev->ev_arg); - if (event_gotsig || base->event_break) + if (event_gotsig || base->event_break) { + ev->ev_pncalls = NULL; return; + } } + ev->ev_pncalls = NULL; } }