qcacmn: Avoid infinite loop while parsing RNR IE

A value of 0 in TBTT Information Count subfield indicates
one TBTT Information field is present.Test expression in
for loop should consider 0 as a valid value to avoid infinite
loop.

Change-Id: I0dc0f694147b6c4f91a8be0bfbd7c6d4bb95e1f1
CRs-Fixed: 2582936
此提交包含在:
Jeevan Kukkalli
2019-12-12 19:04:27 +05:30
提交者 nshrivas
父節點 5a6aec0277
當前提交 66f08b7be6

查看文件

@@ -694,7 +694,7 @@ util_scan_parse_rnr_ie(struct scan_cache_entry *scan_entry,
neighbor_ap_info->operting_class);
scm_debug("tbtt_count %d, tbtt_length %d, fieldtype %d",
tbtt_count, tbtt_length, fieldtype);
for (i = 0; i < tbtt_count && i < MAX_RNR_BSS; i++) {
for (i = 0; i < (tbtt_count + 1) && i < MAX_RNR_BSS; i++) {
data = data + sizeof(struct neighbor_ap_info_field);
util_scan_update_rnr(&scan_entry->rnr.bss_info[i],
neighbor_ap_info,