From: Aki Tuomi Date: Tue, 31 Mar 2015 20:08:58 +0000 (+0300) Subject: Validate algorithm on assign X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~98^2~25^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5dce7548946991c5970d3bb169b809b0670550aa;p=thirdparty%2Fpdns.git Validate algorithm on assign --- diff --git a/pdns/pdnssec.cc b/pdns/pdnssec.cc index 428fbf92d5..a743c77207 100644 --- a/pdns/pdnssec.cc +++ b/pdns/pdnssec.cc @@ -2096,6 +2096,11 @@ try } int algorithm = shorthand2algorithm(cmds[3]); + if (algorithm<0) { + cerr << "Unable to use unknown algorithm '" << cmds[3] << "'" << std::endl; + return 1; + } + int id; bool keyOrZone = (cmds[4] == "ksk" ? true : false); string module = cmds[5];