Skip to content

missing null pointer checks #889

Closed
@ddmesh

Description

@ddmesh

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.

eth_if->get_emac().set_hwaddr(mac);


return (eth_if->get_connection_status() == NSAPI_STATUS_GLOBAL_UP ? LinkON : LinkOFF);

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