summaryrefslogtreecommitdiff
path: root/source4/libcli/ldap
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-06-19 10:37:45 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:18:30 -0500
commit7267cb3312f148be8cd00eb76b8e137cd4b2a314 (patch)
tree57c53a26c272a60ea0f79345f3e64391254d4138 /source4/libcli/ldap
parent7b23cd45883d1d75ffd2fabf936979500e046d62 (diff)
downloadsamba-7267cb3312f148be8cd00eb76b8e137cd4b2a314.tar.gz
samba-7267cb3312f148be8cd00eb76b8e137cd4b2a314.tar.bz2
samba-7267cb3312f148be8cd00eb76b8e137cd4b2a314.zip
r7749: some bug fixes from testing with socket:testnonblock
- fixed some infinite loops in asn1.c - ensure asn1 callers know if an error is end of buffer or bad data - handle npending 0 in ldap server (This used to be commit f22c3b84c8912ccd36e676a782b58f1841be8875)
Diffstat (limited to 'source4/libcli/ldap')
-rw-r--r--source4/libcli/ldap/ldap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/libcli/ldap/ldap.c b/source4/libcli/ldap/ldap.c
index 2514e10117..d7a230a77f 100644
--- a/source4/libcli/ldap/ldap.c
+++ b/source4/libcli/ldap/ldap.c
@@ -501,7 +501,9 @@ static struct ldb_parse_tree *ldap_decode_filter_tree(TALLOC_CTX *mem_ctx,
ret->operation = LDB_OP_NOT;
ret->u.not.child = ldap_decode_filter_tree(ret, data);
-
+ if (ret->u.not.child == NULL) {
+ goto failed;
+ }
if (!asn1_end_tag(data)) {
goto failed;
}
@@ -595,7 +597,6 @@ static struct ldb_parse_tree *ldap_decode_filter_tree(TALLOC_CTX *mem_ctx,
failed:
talloc_free(ret);
- DEBUG(0,("Failed to parse ASN.1 LDAP filter\n"));
return NULL;
}