From: Bert Hubert Date: Tue, 11 Jan 2011 21:42:56 +0000 (+0000) Subject: improve syntax checking for pdnssec X-Git-Tag: auth-3.0~374 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=471304cc3eb7cf6e6cb90821426d93730e46f04c;p=pdns improve syntax checking for pdnssec git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1873 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/pdnssec.cc b/pdns/pdnssec.cc index dbc0cb43a..d93c9140d 100644 --- a/pdns/pdnssec.cc +++ b/pdns/pdnssec.cc @@ -315,6 +315,10 @@ try dk.addKey(zone, keyOrZone, algorithm, bits); } else if(cmds[0] == "remove-zone-key") { + if(cmds.size() < 3) { + cerr<<"Syntax: pdnssec remove-zone-key ZONE KEY-ID\n"; + return 0; + } const string& zone=cmds[1]; unsigned int id=atoi(cmds[2].c_str()); dk.removeKey(zone, id);