Per default an object is created via arduino::EthernetClass Ethernet;. In this case the eth_if member got initialized (which is a pointer).
But when user creates his own object and passes a null pointer for EthernetInterface()
arduino::EthernetClass Ethernet(nullptr);
Several calls to other public functions, will directly call/access the null pointer.
https://github.com/arduino/ArduinoCore-mbed/blob/dd5abb6171063b2777620b9339510c63b915ce72/libraries/Ethernet/src/Ethernet.cpp#L6
Per default an object is created via
arduino::EthernetClass Ethernet;
. In this case theeth_if
member got initialized (which is a pointer).But when user creates his own object and passes a null pointer for EthernetInterface()
arduino::EthernetClass Ethernet(nullptr);
Several calls to other public functions, will directly call/access the null pointer.https://github.com/arduino/ArduinoCore-mbed/blob/dd5abb6171063b2777620b9339510c63b915ce72/libraries/Ethernet/src/Ethernet.cpp#L17 https://github.com/arduino/ArduinoCore-mbed/blob/dd5abb6171063b2777620b9339510c63b915ce72/libraries/Ethernet/src/Ethernet.cpp#L56 https://github.com/arduino/ArduinoCore-mbed/blob/dd5abb6171063b2777620b9339510c63b915ce72/libraries/Ethernet/src/Ethernet.cpp#L71 https://github.com/arduino/ArduinoCore-mbed/blob/dd5abb6171063b2777620b9339510c63b915ce72/libraries/Ethernet/src/Ethernet.cpp#L80