s3-tldap: Make sure we don't deref a null pointer.
authorAndreas Schneider <asn@samba.org>
Mon, 18 Feb 2013 16:30:19 +0000 (17:30 +0100)
committerAlexander Bokovoy <ab@samba.org>
Fri, 22 Feb 2013 15:36:12 +0000 (16:36 +0100)
Reviewed-by: Alexander Bokovoy <ab@samba.org>
source3/lib/tldap.c

index 8e9123442240ee8a130fb61bbc643a6b3ec66569..b094c2d3c2904d4fe808cf2fdab01011a6576663 100644 (file)
@@ -1370,6 +1370,9 @@ static bool tldap_push_filter_basic(struct tldap_context *ld,
                        dn++;
 
                        rule = strchr(dn, ':');
+                       if (rule == NULL) {
+                               return false;
+                       }
                        if ((rule == dn + 1) || rule + 1 == e) {
                                /* malformed filter, contains "::" */
                                return false;