Skip to content

potential null pointer access / _initializerCallback not initialized #890

Closed
@ddmesh

Description

@ddmesh

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy