]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
tldap: Parse a search entry only if it is one
authorVolker Lendecke <vl@samba.org>
Tue, 2 Feb 2016 11:15:49 +0000 (12:15 +0100)
committerGünther Deschner <gd@samba.org>
Wed, 3 Feb 2016 17:12:43 +0000 (18:12 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Feb  3 18:12:44 CET 2016 on sn-devel-144

source3/lib/tldap.c

index 1f9462adaf9f4495c9bc6ac29558c11859a46589..a7027832470d35480d9ebef6ded6ab07a984c8a2 100644 (file)
@@ -2003,7 +2003,12 @@ static bool tldap_parse_search_entry(struct tldap_message *msg)
 {
        int num_attribs = 0;
 
-       if (!asn1_start_tag(msg->data, msg->type)) return false;
+       if (msg->type != TLDAP_RES_SEARCH_ENTRY) {
+               return false;
+       }
+       if (!asn1_start_tag(msg->data, TLDAP_RES_SEARCH_ENTRY)) {
+               return false;
+       }
 
        /* dn */