From: Pieter Lexis Date: Thu, 9 Nov 2017 10:24:36 +0000 (+0100) Subject: Check return of getTSIGKey and B64Decode in the TCPReceiver X-Git-Tag: auth-4.1.0-rc3~3^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=53ace5d500563c3a5156b496898e5e2b1d6cbcfb;p=thirdparty%2Fpdns.git Check return of getTSIGKey and B64Decode in the TCPReceiver --- diff --git a/pdns/tcpreceiver.cc b/pdns/tcpreceiver.cc index b5af6918ea..eece6994ff 100644 --- a/pdns/tcpreceiver.cc +++ b/pdns/tcpreceiver.cc @@ -639,8 +639,14 @@ int TCPNameserver::doAXFR(const DNSName &target, shared_ptr q, int ou algorithm = DNSName("hmac-md5"); if (algorithm != DNSName("gss-tsig")) { Lock l(&s_plock); - s_P->getBackend()->getTSIGKey(tsigkeyname, &algorithm, &tsig64); - B64Decode(tsig64, tsigsecret); + if(!s_P->getBackend()->getTSIGKey(tsigkeyname, &algorithm, &tsig64)) { + L< q, int outsock) if (algorithm == DNSName("hmac-md5.sig-alg.reg.int")) algorithm = DNSName("hmac-md5"); Lock l(&s_plock); - s_P->getBackend()->getTSIGKey(tsigkeyname, &algorithm, &tsig64); - B64Decode(tsig64, tsigsecret); + if(!s_P->getBackend()->getTSIGKey(tsigkeyname, &algorithm, &tsig64)) { + L<