#endif
newtree = proxy_convert_tree(ac, proxy, req->op.search.tree);
+ if (newtree == NULL) {
+ goto failed;
+ }
/* convert the basedn of this search */
base = ldb_dn_copy(ac, req->op.search.base);
struct ldb_control ***control_res,
struct ldap_message ***results)
{
- struct ldb_parse_tree *tree = ldb_parse_tree(conn, expression);
NTSTATUS status;
+ struct ldb_parse_tree *tree = ldb_parse_tree(conn, expression);
+
+ if (tree == NULL) {
+ return NT_STATUS_INVALID_PARAMETER;
+ }
status = ildap_search_bytree(conn, basedn, scope, tree, attrs,
attributesonly, control_req,
control_res, results);