diff options
author | Vinit Deshpande <vinitd@google.com> | 2015-07-08 17:43:21 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-07-08 17:43:22 +0000 |
commit | 58a0053e1d5957808dead5b93df51a02a65fc46d (patch) | |
tree | 92d6e3a6b96fcdfc04dad708fb23c6b7d0c35e70 | |
parent | eaf59b2182588ab2e921741c772070281840e89b (diff) | |
parent | 496e6ab2147ee8bae2aa93cdd13cab2f129079f4 (diff) | |
download | hardware_broadcom_wlan-58a0053e1d5957808dead5b93df51a02a65fc46d.zip hardware_broadcom_wlan-58a0053e1d5957808dead5b93df51a02a65fc46d.tar.gz hardware_broadcom_wlan-58a0053e1d5957808dead5b93df51a02a65fc46d.tar.bz2 |
Merge "Fix for system crash caused by accessing memory w/o permissions" into mnc-dev
-rw-r--r-- | bcmdhd/wifi_hal/common.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bcmdhd/wifi_hal/common.cpp b/bcmdhd/wifi_hal/common.cpp index 9182114..fc81d61 100644 --- a/bcmdhd/wifi_hal/common.cpp +++ b/bcmdhd/wifi_hal/common.cpp @@ -213,7 +213,7 @@ void wifi_unregister_cmd(wifi_handle handle, WifiCommand *cmd) for (int i = 0; i < info->num_cmd; i++) { if (info->cmd[i].cmd == cmd) { int id = info->cmd[i].id; - memmove(&info->cmd[i], &info->cmd[i+1], (info->num_cmd - i) * sizeof(cmd_info)); + memmove(&info->cmd[i], &info->cmd[i+1], (info->num_cmd - i - 1) * sizeof(cmd_info)); info->num_cmd--; ALOGV("Successfully removed command %d: %p from %d", id, cmd, i); break; |