Bluetooth: Fix wrong Get Clock Information return parameters
authorMarcel Holtmann <marcel@holtmann.org>
Mon, 29 Aug 2016 04:19:47 +0000 (06:19 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 19 Sep 2016 18:19:34 +0000 (20:19 +0200)
The address information of the Get Clock Information return parameters
is copying from a different memory location. It uses &cmd->param while
it actually needs to be cmd->param.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
net/bluetooth/mgmt.c

index 469f5cc3109be83ae5189b3a54527e9ebd60649b..0c83dd36b7e3f74c9adc8c3f325b6c7cafb48f42 100644 (file)
@@ -4869,7 +4869,7 @@ static int clock_info_cmd_complete(struct mgmt_pending_cmd *cmd, u8 status)
        int err;
 
        memset(&rp, 0, sizeof(rp));
-       memcpy(&rp.addr, &cmd->param, sizeof(rp.addr));
+       memcpy(&rp.addr, cmd->param, sizeof(rp.addr));
 
        if (status)
                goto complete;