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.0.5~1^2~1^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80def6b0cbf34e60102576f19a975ff54108e59d;p=thirdparty%2Fpdns.git Check return of getTSIGKey and B64Decode in the TCPReceiver (cherry picked from commit 53ace5d500563c3a5156b496898e5e2b1d6cbcfb) --- diff --git a/pdns/tcpreceiver.cc b/pdns/tcpreceiver.cc index ec8a4aac3e..cf8e29dfb7 100644 --- a/pdns/tcpreceiver.cc +++ b/pdns/tcpreceiver.cc @@ -626,8 +626,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<