From: Christian Hofstaedtler Date: Sat, 2 Jan 2016 18:20:18 +0000 (+0100) Subject: Fix pdnsutil check-all-zones crash X-Git-Tag: dnsdist-1.0.0-alpha2~130^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=92d241085276d70acfde39d19f8124e0eaee286a;p=pdns Fix pdnsutil check-all-zones crash Fixes #3147 --- diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index 7f02c289c..1198b673c 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -1570,7 +1570,7 @@ seedRandom(::arg()["entropy-source"]); dbBench(cmds.size() > 1 ? cmds[1] : ""); } else if (cmds[0] == "check-all-zones") { - bool exitOnError = (cmds[1] == "exit-on-error"); + bool exitOnError = ((cmds.size() > 2 ? cmds[1] : "") == "exit-on-error"); exit(checkAllZones(dk, exitOnError)); } else if (cmds[0] == "list-all-zones") { @@ -1614,7 +1614,6 @@ seedRandom(::arg()["entropy-source"]); } verifyCrypto(cmds[1]); } - else if(cmds[0] == "show-zone") { if(cmds.size() != 2) { cerr << "Syntax: pdnsutil show-zone ZONE"<