diff options
| author | Hong Shi <hongsh@codeaurora.org> | 2016-11-14 14:08:03 +0800 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2016-11-29 16:07:13 -0800 |
| commit | bfc6d488802ac3e015efe8bc0edff0c44ac8fa64 (patch) | |
| tree | 341a89250c15303b895964530b869c0462e60a67 | |
| parent | a1a1dbf0ce7b1844c44f1273840610d73c4e601f (diff) | |
qcacld-3.0: Fix potential crash when setting monitor channel
qcacld-2.0 to qcacld-3.0 propagation
The tCsrRoamProfile memory is not initialized to 0 properly. For the
supported_rates field, it contains a rates array with max size 12
and an integer field numRates which is the actual length of the rates
array. If numRates is not initialized properly and value is unexpected.
it may cause memory access violation error.
CRs-Fixed: 1084846
Change-Id: Ic5b1a13356e835a1186c53768a1d8ab416c9365c
| -rw-r--r-- | core/hdd/src/wlan_hdd_wext.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index 8a8e2ebec8dc..591ff4032f75 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -9812,6 +9812,7 @@ static int wlan_hdd_set_mon_chan(hdd_adapter_t *adapter, uint32_t chan, } hdd_info("Set monitor mode Channel %d", chan); + qdf_mem_zero(&roam_profile, sizeof(roam_profile)); roam_profile.ChannelInfo.ChannelList = &ch_info->channel; roam_profile.ChannelInfo.numOfChannels = 1; roam_profile.phyMode = ch_info->phy_mode; |
