]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
make sure pdnssec test-algorithm has an argument
authorPeter van Dijk <peter.van.dijk@netherlabs.nl>
Thu, 12 Jul 2012 10:02:39 +0000 (10:02 +0000)
committerPeter van Dijk <peter.van.dijk@netherlabs.nl>
Thu, 12 Jul 2012 10:02:39 +0000 (10:02 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2675 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/pdnssec.cc

index 1b44880309ef5e42b92f621c4253f064612b1304..3fca9a665d6c160902a85e42485ba4788e57f0ce 100644 (file)
@@ -516,6 +516,10 @@ try
   }
   
   if (cmds[0] == "test-algorithm") {
+    if(cmds.size() != 2) {
+      cerr << "Syntax: pdnssec test-algorithm algonum"<<endl;
+      return 0;
+    }
     testAlgorithm(lexical_cast<int>(cmds[1]));
     return 0; 
   }