ArduinoMDNS icon indicating copy to clipboard operation
ArduinoMDNS copied to clipboard

esp32 crash when no resolve

Open alonmuroch opened this issue 2 months ago • 0 comments

How to reproduce:

  • esp32-wroom-dev
  • W5500 ethernet

When resolve times out a crash happens on MDNS.cpp:1429 due to ipAddr == NULL. It's NULL because the function is called by MDNS.cpp:1429:1071

How to solve: change MDNS:1071 to

if (i == 0) {
               byte* noneAddress = new byte[4]{0, 0, 0, };
               this->_finishedResolvingName((char*)this->_resolveNames[0], noneAddress);
            }

{255, 255, 255, 255} is equal to INADDR_NONE

alonmuroch avatar Dec 31 '24 13:12 alonmuroch