summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-08-18 19:54:31 +0000
committerAndrew Bartlett <abartlet@samba.org>2013-08-19 11:08:27 +1200
commitcb598ddab6935820975042a8a307c75dba9d7e31 (patch)
tree03cbd7ddbe2cff75a51e587493a61411ae841d1c /lib
parentcbb5c1ce39640ffd01aeed6d87a57940e344792c (diff)
downloadsamba-cb598ddab6935820975042a8a307c75dba9d7e31.tar.gz
samba-cb598ddab6935820975042a8a307c75dba9d7e31.tar.bz2
samba-cb598ddab6935820975042a8a307c75dba9d7e31.zip
ldb_map: Fix CID 1034791 Dereference null return value
Add NULL checks Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/ldb/ldb_map/ldb_map.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/ldb/ldb_map/ldb_map.c b/lib/ldb/ldb_map/ldb_map.c
index d95f050b30..ce2d660c87 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;