From: Wouter Wijngaards Date: Tue, 14 Jun 2016 07:23:08 +0000 (+0000) Subject: - Fix 775: unbound-host and unbound-anchor crash on windows, ignore X-Git-Tag: release-1.5.10~81 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=034febc8e32b03ce51df37eca57e6fd18e76f496;p=thirdparty%2Funbound.git - Fix 775: unbound-host and unbound-anchor crash on windows, ignore null delete for wsaevent. git-svn-id: file:///svn/unbound/trunk@3784 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/Changelog b/doc/Changelog index 16cc87c75..18bd5c822 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,7 @@ +14 June 2016: Ralph + - Fix 775: unbound-host and unbound-anchor crash on windows, ignore + null delete for wsaevent. + 13 June 2016: Ralph - Use QTYPE=A for QNAME minimisation. - Keep track of number of time-outs when performing QNAME minimisation. diff --git a/util/ub_event_pluggable.c b/util/ub_event_pluggable.c index 5c517555e..f8a4b9a6f 100644 --- a/util/ub_event_pluggable.c +++ b/util/ub_event_pluggable.c @@ -597,7 +597,7 @@ ub_event_add(struct ub_event* ev, struct timeval* tv) int ub_event_del(struct ub_event* ev) { - if (ev->magic == UB_EVENT_MAGIC) { + if (ev && ev->magic == UB_EVENT_MAGIC) { fptr_ok(ev->vmt != &default_event_vmt || ev->vmt->del == my_event_del); return (*ev->vmt->del)(ev); @@ -620,7 +620,7 @@ ub_timer_add(struct ub_event* ev, struct ub_event_base* base, int ub_timer_del(struct ub_event* ev) { - if (ev->magic == UB_EVENT_MAGIC) { + if (ev && ev->magic == UB_EVENT_MAGIC) { fptr_ok(ev->vmt != &default_event_vmt || ev->vmt->del_timer == my_timer_del); return (*ev->vmt->del_timer)(ev); @@ -642,7 +642,7 @@ ub_signal_add(struct ub_event* ev, struct timeval* tv) int ub_signal_del(struct ub_event* ev) { - if (ev->magic == UB_EVENT_MAGIC) { + if (ev && ev->magic == UB_EVENT_MAGIC) { fptr_ok(ev->vmt != &default_event_vmt || ev->vmt->del_signal == my_signal_del); return (*ev->vmt->del_signal)(ev); @@ -653,7 +653,7 @@ ub_signal_del(struct ub_event* ev) void ub_winsock_unregister_wsaevent(struct ub_event* ev) { - if (ev->magic == UB_EVENT_MAGIC) { + if (ev && ev->magic == UB_EVENT_MAGIC) { fptr_ok(ev->vmt != &default_event_vmt || ev->vmt->winsock_unregister_wsaevent == my_winsock_unregister_wsaevent);