From: Volker Lendecke Date: Tue, 2 Feb 2016 11:15:49 +0000 (+0100) Subject: tldap: Parse a search entry only if it is one X-Git-Tag: tevent-0.9.27~91 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7434723ecda802e0fcefa075e583983b7671d927;p=thirdparty%2Fsamba.git tldap: Parse a search entry only if it is one Signed-off-by: Volker Lendecke Reviewed-by: Guenther Deschner Autobuild-User(master): Günther Deschner Autobuild-Date(master): Wed Feb 3 18:12:44 CET 2016 on sn-devel-144 --- diff --git a/source3/lib/tldap.c b/source3/lib/tldap.c index 1f9462adaf9..a7027832470 100644 --- a/source3/lib/tldap.c +++ b/source3/lib/tldap.c @@ -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 */