diff --git a/src/core/netif.c b/src/core/netif.c index e95cb672..595fc58c 100644 --- a/src/core/netif.c +++ b/src/core/netif.c @@ -1714,6 +1714,10 @@ netif_find(const char *name) } num = (u8_t)atoi(&name[2]); + if (!num && (name[2] != 0)) { + /* this means atoi has failed */ + return NULL; + } NETIF_FOREACH(netif) { if (num == netif->num &&