tests: Set wpa_s->global for module tests
This is needed to avoid NULL pointer deferencing in wpa_supplicant_ctrl_iface_msg_cb() if any of the functions called from wpas_bssid_ignore_module_tests_() ends up using wpa_msg(). Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
parent
69ea73bfed
commit
c8b4ad70b1
1 changed files with 3 additions and 0 deletions
|
@ -17,9 +17,12 @@
|
||||||
static int wpas_bssid_ignore_module_tests(void)
|
static int wpas_bssid_ignore_module_tests(void)
|
||||||
{
|
{
|
||||||
struct wpa_supplicant wpa_s;
|
struct wpa_supplicant wpa_s;
|
||||||
|
struct wpa_global global;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
os_memset(&wpa_s, 0, sizeof(wpa_s));
|
os_memset(&wpa_s, 0, sizeof(wpa_s));
|
||||||
|
os_memset(&global, 0, sizeof(global));
|
||||||
|
wpa_s.global = &global;
|
||||||
|
|
||||||
wpa_bssid_ignore_clear(&wpa_s);
|
wpa_bssid_ignore_clear(&wpa_s);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue