浏览代码

qcacmn: Avoid checking extcaps byte if equal to IE len

Reading extcaps from the scan entry currently checks if the byte
to be accessed is less than the length of the IE. Following this,
it will attempt to access the extcap IE using the requested byte
as the index.

Avoid accessing the extcap IE if the byte is greater than one less
than the ie_len (since indexing starts from zero).

CRs-Fixed: 2856212
Change-Id: Ie357edcd6095570c05871af657381c287e92504e
Aditya Sathish 4 年之前
父节点
当前提交
32515d5e22
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      umac/scan/dispatcher/inc/wlan_scan_utils_api.h

+ 1 - 1
umac/scan/dispatcher/inc/wlan_scan_utils_api.h

@@ -1419,7 +1419,7 @@ util_scan_entry_get_extcap(struct scan_cache_entry *scan_entry,
 	if (!ext_cap)
 	if (!ext_cap)
 		return QDF_STATUS_E_NULL_VALUE;
 		return QDF_STATUS_E_NULL_VALUE;
 
 
-	if (ext_cap->ext_cap_len < ext_caps_byte)
+	if (ext_cap->ext_cap_len <= ext_caps_byte)
 		return QDF_STATUS_E_NULL_VALUE;
 		return QDF_STATUS_E_NULL_VALUE;
 
 
 	*extcap_value =
 	*extcap_value =