station: Prevent a NULL pointer access

There is an unchecked NULL pointer access in network_has_open_pair.
open_info can be NULL, when out of multiple APs in range that advertise
the same SSID some advertise OWE transition elments and some don't.
This commit is contained in:
Torsten Schmitz 2021-11-07 01:41:37 +01:00 committed by Denis Kenzior
parent 017069bf68
commit 5a111ac902
1 changed files with 4 additions and 0 deletions

View File

@ -698,6 +698,10 @@ static bool network_has_open_pair(struct network *network, struct scan_bss *owe)
struct scan_bss *open = entry->data;
struct ie_owe_transition_info *open_info = open->owe_trans;
/* AP does not advertise owe transition */
if (!open_info)
continue;
/*
* Check if this is an Open/Hidden pair:
*