summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2013-02-18 17:30:19 +0100
committerAlexander Bokovoy <ab@samba.org>2013-02-22 16:36:12 +0100
commitf4761c90fa0f2161e3d799b69d569cd2e38fe10c (patch)
treeee0731c73db2eef7d8dfd410082524102e17bcf9 /source3
parenta3ac48d07fa101743a023c31046495125498e5a1 (diff)
downloadsamba-f4761c90fa0f2161e3d799b69d569cd2e38fe10c.tar.gz
samba-f4761c90fa0f2161e3d799b69d569cd2e38fe10c.tar.bz2
samba-f4761c90fa0f2161e3d799b69d569cd2e38fe10c.zip
s3-tldap: Make sure we don't deref a null pointer.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/tldap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/lib/tldap.c b/source3/lib/tldap.c
index 8e91234422..b094c2d3c2 100644
--- a/source3/lib/tldap.c
+++ b/source3/lib/tldap.c
@@ -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;