mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-29 18:27:31 +02:00
fix(mdns): Fix potential null derefernce in _mdns_execute_action()
We did check for null-deref before checking 'a->type', but contol continues and passes potential null-ptr to the processing function _mdns_execute_action() Fixed by asserting action != NULL, since it is an invalid state which should never happen.
This commit is contained in:
@ -5346,7 +5346,8 @@ static void _mdns_service_task(void *pvParameters)
|
|||||||
for (;;) {
|
for (;;) {
|
||||||
if (_mdns_server && _mdns_server->action_queue) {
|
if (_mdns_server && _mdns_server->action_queue) {
|
||||||
if (xQueueReceive(_mdns_server->action_queue, &a, portMAX_DELAY) == pdTRUE) {
|
if (xQueueReceive(_mdns_server->action_queue, &a, portMAX_DELAY) == pdTRUE) {
|
||||||
if (a && a->type == ACTION_TASK_STOP) {
|
assert(a);
|
||||||
|
if (a->type == ACTION_TASK_STOP) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
MDNS_SERVICE_LOCK();
|
MDNS_SERVICE_LOCK();
|
||||||
|
Reference in New Issue
Block a user