- Fix #778: unbound 1.5.9: -h segfault (null deref).

git-svn-id: file:///svn/unbound/trunk@3781 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2016-06-13 07:06:23 +00:00
parent 68f6a22d75
commit 48acd0bf4d
2 changed files with 9 additions and 1 deletions

View file

@ -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

View file

@ -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,