Fix bug #6279 - winbindd crash. Cope with LDAP libraries returning LDAP_SUCCESS but...
authorJeremy Allison <jra@samba.org>
Wed, 22 Apr 2009 09:24:27 +0000 (02:24 -0700)
committerKarolin Seeger <kseeger@samba.org>
Tue, 2 Jun 2009 10:41:52 +0000 (12:41 +0200)
Jeremy
(cherry picked from commit e7687dd9ca244a53fdf2312a78cdb028dd8971d5)

source/libads/ldap.c

index 9eae2d4f51395c5e390fe275789d685944fec0c8..8c37bfb69e00ab56c09876a0721eb85e53bbe78f 100644 (file)
@@ -118,6 +118,10 @@ static int ldap_search_with_timeout(LDAP *ld,
        if (gotalarm != 0)
                return LDAP_TIMELIMIT_EXCEEDED;
 
+       if (*res == NULL) {
+               return LDAP_TIMELIMIT_EXCEEDED;
+       }
+
        return result;
 }