Skip to content

Commit 8f8516c

Browse files
committed
fix(mdns): Fixed incorrect error conversion
Mixing esp_err_t (int) with err_t (uint8_t) from lwip. Closes coverity isssue: 470139 Overflowed return value
1 parent 75a8e86 commit 8f8516c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/mdns/mdns_networking_lwip.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ typedef struct {
288288
static err_t _mdns_pcb_init_api(struct tcpip_api_call_data *api_call_msg)
289289
{
290290
mdns_api_call_t *msg = (mdns_api_call_t *)api_call_msg;
291-
msg->err = _udp_pcb_init(msg->tcpip_if, msg->ip_protocol);
291+
msg->err = _udp_pcb_init(msg->tcpip_if, msg->ip_protocol) == ESP_OK ? ERR_OK : ERR_IF;
292292
return msg->err;
293293
}
294294

0 commit comments

Comments
 (0)