summaryrefslogtreecommitdiff
path: root/libcli/ldap
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2016-01-11 21:49:21 +0100
committerGünther Deschner <gd@samba.org>2016-02-03 15:04:11 +0100
commit7d8006f3b4e4bd435db7177002198f205ca3781a (patch)
tree91c27dcd5b41432f2c80e6e184904935fb0bc7b0 /libcli/ldap
parent024c619fa82960ae4f8af029b6872102202ffd07 (diff)
downloadsamba-7d8006f3b4e4bd435db7177002198f205ca3781a.tar.gz
ldap: Correctly check asn1_tag_remaining retval
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
Diffstat (limited to 'libcli/ldap')
-rw-r--r--libcli/ldap/ldap_message.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcli/ldap/ldap_message.c b/libcli/ldap/ldap_message.c
index 76d2ee95c94..c89705bbf41 100644
--- a/libcli/ldap/ldap_message.c
+++ b/libcli/ldap/ldap_message.c
@@ -886,7 +886,7 @@ static struct ldb_parse_tree *ldap_decode_filter_tree(TALLOC_CTX *mem_ctx,
goto failed;
}
- while (asn1_tag_remaining(data)) {
+ while (asn1_tag_remaining(data) > 0) {
if (!asn1_peek_uint8(data, &subs_tag)) goto failed;
subs_tag &= 0x1f; /* strip off the asn1 stuff */
if (subs_tag > 2) goto failed;