Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32 ARM_WIFI_Initialize callback parameter not checked for NULL #13

Open
xennex22 opened this issue Dec 18, 2021 · 1 comment
Open
Assignees

Comments

@xennex22
Copy link

ARM_WIFI_Initialize takes a callback parameter cb_event. This is only used for ARM_WIFI_EVENT_AP_CONNECT and ARM_WIFI_EVENT_AP_DISCONNECT.

According to help the cb_event parameter can be NULL if no callback signals are required, however if AT_NOTIFY_STATION_CONNECTED or AT_NOTIFY_STATION_DISCONNECTED events are generated then the event callback is called without checking it if is NULL.

This occurs if the connection to the remote host drops for some reason.

pCtrl->cb_event (ARM_WIFI_EVENT_AP_CONNECT, mac);

Probably just needs a preceding test if(pCtrl->cb_event)

@VladimirUmek
Copy link
Collaborator

You are right again, this check shall be added. Thanks for taking the time and reporting this!

@VladimirUmek VladimirUmek self-assigned this Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants