You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When user creates his own object and passes a null pointer for EthernetInterface() arduino::EthernetClass Ethernet(nullptr); then the uninitialized function pointer _initializerCallback is called accessing some random memory location.
Also as the comment asks "What is this function for?". If this is not defined or documentated, then you should remove it completely to avoid such errors. Beside of this, this "callback" functions makes no sence, as this is called from EthernetClass::begin() synchronously. So the user can call any function afterwards. It is bad design to move private project specific code into public libraries.
The text was updated successfully, but these errors were encountered:
ArduinoCore-mbed/libraries/Ethernet/src/Ethernet.cpp
Line 8 in dd5abb6
When user creates his own object and passes a null pointer for EthernetInterface()
arduino::EthernetClass Ethernet(nullptr);
then the uninitialized function pointer_initializerCallback
is called accessing some random memory location.Also as the comment asks "What is this function for?". If this is not defined or documentated, then you should remove it completely to avoid such errors. Beside of this, this "callback" functions makes no sence, as this is called from
EthernetClass::begin()
synchronously. So the user can call any function afterwards. It is bad design to move private project specific code into public libraries.The text was updated successfully, but these errors were encountered: