From 3de7f430db6237487ac68922c80f6114dcb5434b Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Wed, 8 May 2019 12:50:30 +1200 Subject: [PATCH] ldb_map: check a return value (CID 241354) Signed-off-by: Douglas Bagnall Reviewed-by: Gary Lockyer --- lib/ldb/ldb_map/ldb_map_outbound.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ldb/ldb_map/ldb_map_outbound.c b/lib/ldb/ldb_map/ldb_map_outbound.c index 1f1a7e80142..c823ba4a5c6 100644 --- a/lib/ldb/ldb_map/ldb_map_outbound.c +++ b/lib/ldb/ldb_map/ldb_map_outbound.c @@ -921,6 +921,9 @@ static int map_subtree_collect_remote(struct ldb_module *module, void *mem_ctx, } map = map_attr_find_local(data, tree->u.equality.attr); + if (map == NULL) { + return LDB_ERR_OPERATIONS_ERROR; + } if (map->convert_operator) { return map->convert_operator(module, mem_ctx, new, tree); } -- 2.47.3