From 7efd3d2c6330cca870e499eb6a2fde1ef46911b5 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Wed, 29 May 2019 14:25:25 +0200 Subject: [PATCH] auth: Check the return of getNext() in LdapBackend::getDomainInfo() Reported by Coverity (CID 1401649). --- modules/ldapbackend/native.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 < ) { -- 2.47.2