From: Remi Gacogne Date: Wed, 29 May 2019 12:25:25 +0000 (+0200) Subject: auth: Check the return of getNext() in LdapBackend::getDomainInfo() X-Git-Tag: dnsdist-1.4.0-beta1~8^2~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7efd3d2c6330cca870e499eb6a2fde1ef46911b5;p=thirdparty%2Fpdns.git auth: Check the return of getNext() in LdapBackend::getDomainInfo() Reported by Coverity (CID 1401649). --- diff --git a/modules/ldapbackend/native.cc b/modules/ldapbackend/native.cc index f69d78dd46..c0f913fa36 100644 --- a/modules/ldapbackend/native.cc +++ b/modules/ldapbackend/native.cc @@ -372,7 +372,9 @@ bool LdapBackend::getDomainInfo( const DNSName& domain, DomainInfo& di, bool get // search for SOARecord of domain filter = "(&(associatedDomain=" + toLower( d_pldap->escape( domain.toStringRootDot() ) ) + ")(SOARecord=*))"; d_search = d_pldap->search( getArg( "basedn" ), LDAP_SCOPE_SUBTREE, filter, attronly ); - d_search->getNext( result ); + if (!d_search->getNext( result )) { + return false; + } } catch( LDAPTimeout < ) {