summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/hdd/src/wlan_hdd_ioctl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c
index 6add68d8b95d..2f6a9efb89da 100644
--- a/core/hdd/src/wlan_hdd_ioctl.c
+++ b/core/hdd/src/wlan_hdd_ioctl.c
@@ -5134,8 +5134,9 @@ static int drv_cmd_get_ibss_peer_info_all(hdd_adapter_t *adapter,
goto exit;
}
- priv_data->buf[numOfBytestoPrint] = '\0';
- hdd_debug("%s", priv_data->buf);
+ /* This overwrites the last space, which we already copied */
+ extra[numOfBytestoPrint - 1] = '\0';
+ hdd_debug("%s", extra);
if (length > numOfBytestoPrint) {
if (copy_to_user
@@ -5146,7 +5147,7 @@ static int drv_cmd_get_ibss_peer_info_all(hdd_adapter_t *adapter,
ret = -EFAULT;
goto exit;
}
- hdd_debug("%s", &priv_data->buf[numOfBytestoPrint]);
+ hdd_debug("%s", &extra[numOfBytestoPrint]);
}
/* Free temporary buffer */