diff options
author | Stuart Henderson <sthen@cvs.openbsd.org> | 2016-06-22 20:09:56 +0000 |
---|---|---|
committer | Stuart Henderson <sthen@cvs.openbsd.org> | 2016-06-22 20:09:56 +0000 |
commit | 2510815922328ccff03df476d211ee927594647e (patch) | |
tree | 1b98b1a9afc0c5d445516d712109c9f80a23ff94 /usr.sbin/unbound | |
parent | 4937f0598af49939d892e5ac23e4713af48b8b85 (diff) |
backport r3781, fix segfault in -h
Diffstat (limited to 'usr.sbin/unbound')
-rw-r--r-- | usr.sbin/unbound/daemon/unbound.c | 7 | ||||
-rw-r--r-- | usr.sbin/unbound/doc/Changelog | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/usr.sbin/unbound/daemon/unbound.c b/usr.sbin/unbound/daemon/unbound.c index d1de6736982..92a8ef7b94f 100644 --- a/usr.sbin/unbound/daemon/unbound.c +++ b/usr.sbin/unbound/daemon/unbound.c @@ -97,6 +97,9 @@ static void usage() { const char** m; const char *evnm="event", *evsys="", *evmethod=""; + time_t t; + struct timeval now; + struct ub_event_base* base; printf("usage: unbound [options]\n"); printf(" start unbound daemon DNS resolver.\n"); printf("-h this help\n"); @@ -110,7 +113,8 @@ static void usage() printf(" service - used to start from services control panel\n"); #endif printf("Version %s\n", PACKAGE_VERSION); - ub_get_event_sys(NULL, &evnm, &evsys, &evmethod); + base = ub_default_event_base(0,&t,&now); + ub_get_event_sys(base, &evnm, &evsys, &evmethod); printf("linked libs: %s %s (it uses %s), %s\n", evnm, evsys, evmethod, #ifdef HAVE_SSL @@ -127,6 +131,7 @@ static void usage() printf("\n"); printf("BSD licensed, see LICENSE in source package for details.\n"); printf("Report bugs to %s\n", PACKAGE_BUGREPORT); + ub_event_base_free(base); } #ifndef unbound_testbound diff --git a/usr.sbin/unbound/doc/Changelog b/usr.sbin/unbound/doc/Changelog index 76ba1e661ec..bbc983eeb89 100644 --- a/usr.sbin/unbound/doc/Changelog +++ b/usr.sbin/unbound/doc/Changelog @@ -1,3 +1,6 @@ +13 June 2016: Wouter + - Fix #778: unbound 1.5.9: -h segfault (null deref). + 2 June 2016: Wouter - Fix libubound for edns optlist feature. - Fix distinction between free and CRYPTO_free in dsa and ecdsa alloc. |