From f4761c90fa0f2161e3d799b69d569cd2e38fe10c Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 18 Feb 2013 17:30:19 +0100 Subject: s3-tldap: Make sure we don't deref a null pointer. Reviewed-by: Alexander Bokovoy --- source3/lib/tldap.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3/lib') 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; -- cgit