From: Volker Lendecke Date: Sun, 18 Aug 2013 19:54:31 +0000 (+0000) Subject: ldb_map: Fix CID 1034791 Dereference null return value X-Git-Tag: talloc-2.1.0~139 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb598ddab6935820975042a8a307c75dba9d7e31;p=thirdparty%2Fsamba.git ldb_map: Fix CID 1034791 Dereference null return value Add NULL checks Signed-off-by: Volker Lendecke Reviewed-by: Andrew Bartlett --- diff --git a/lib/ldb/ldb_map/ldb_map.c b/lib/ldb/ldb_map/ldb_map.c index d95f050b30c..ce2d660c87e 100644 --- a/lib/ldb/ldb_map/ldb_map.c +++ b/lib/ldb/ldb_map/ldb_map.c @@ -223,12 +223,18 @@ int ldb_next_remote_request(struct ldb_module *module, struct ldb_request *reque case LDB_ADD: msg = ldb_msg_copy_shallow(request, request->op.add.message); + if (msg == NULL) { + return LDB_ERR_OPERATIONS_ERROR; + } msg->dn = ldb_dn_rebase_remote(msg, data, msg->dn); request->op.add.message = msg; break; case LDB_MODIFY: msg = ldb_msg_copy_shallow(request, request->op.mod.message); + if (msg == NULL) { + return LDB_ERR_OPERATIONS_ERROR; + } msg->dn = ldb_dn_rebase_remote(msg, data, msg->dn); request->op.mod.message = msg; break;