diff options
| author | Srinivas Girigowda <sgirigow@codeaurora.org> | 2017-03-21 15:38:34 -0700 |
|---|---|---|
| committer | Srinivas Girigowda <sgirigow@codeaurora.org> | 2017-03-21 15:56:35 -0700 |
| commit | 612f73432ea0c53e097397d350efac760a91dc1d (patch) | |
| tree | f2a3a4be05a71d359b1b32508580fb12a348765c | |
| parent | 80b314c35d1807022b9108d613ab2f0369ac1d02 (diff) | |
qcacld-2.0: Fix user space accesses
Don't access user space memory directly in
drv_cmd_get_ibss_peer_info_all.
Change-Id: I36a706e2e91d1ed2a43897ac2eef9d81b2de7335
CRs-Fixed: 2022841
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_main.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c index 3eecb5e1e872..a2e9284b7feb 100644 --- a/CORE/HDD/src/wlan_hdd_main.c +++ b/CORE/HDD/src/wlan_hdd_main.c @@ -7278,9 +7278,10 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter, ret = -EFAULT; goto exit; } - priv_data.buf[numOfBytestoPrint] = '\0'; + /* This overwrites the last space, which we already copied */ + extra[numOfBytestoPrint - 1] = '\0'; VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_MED, - "%s", priv_data.buf); + "%s", extra); if (length > numOfBytestoPrint) { @@ -7294,7 +7295,7 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter, goto exit; } VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_MED, - "%s", &priv_data.buf[numOfBytestoPrint]); + "%s", &extra[numOfBytestoPrint]); } /* Free temporary buffer */ |
