samdb: Fix CID 241968 Uninitialized pointer read
authorVolker Lendecke <vl@samba.org>
Sun, 10 Nov 2013 09:06:18 +0000 (10:06 +0100)
committerIra Cooper <ira@samba.org>
Mon, 11 Nov 2013 20:04:09 +0000 (21:04 +0100)
Interestingly gcc does not catch this at all.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
source4/dsdb/samdb/ldb_modules/local_password.c

index 4adf18038449b4c12565cf19e7d814bdfd09dd56..86c79ee45c3e0d5068e73b5058f2006233220578 100644 (file)
@@ -181,7 +181,7 @@ static int local_password_add(struct ldb_module *module, struct ldb_request *req
                return ldb_operr(ldb);
        }
 
-       remote_message = ldb_msg_copy_shallow(remote_req, req->op.add.message);
+       remote_message = ldb_msg_copy_shallow(ac, req->op.add.message);
        if (remote_message == NULL) {
                return ldb_operr(ldb);
        }