From: Wouter Wijngaards Date: Mon, 13 Jun 2016 07:06:23 +0000 (+0000) Subject: - Fix #778: unbound 1.5.9: -h segfault (null deref). X-Git-Tag: release-1.5.10~84 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=48acd0bf4dee80aaf2eb716843ea927aafadb789;p=thirdparty%2Funbound.git - Fix #778: unbound 1.5.9: -h segfault (null deref). git-svn-id: file:///svn/unbound/trunk@3781 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/daemon/unbound.c b/daemon/unbound.c index d1de67369..92a8ef7b9 100644 --- a/daemon/unbound.c +++ b/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/doc/Changelog b/doc/Changelog index 97a47595f..c02e694b0 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,6 @@ +13 June 2016: Wouter + - Fix #778: unbound 1.5.9: -h segfault (null deref). + 10 June 2016: Wouter - And delete service.conf.shipped on uninstall. - In unbound.conf directory: dir immediately changes to that directory,