summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/net.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/net.c b/net/net.c
index 24767eac93..795264519a 100644
--- a/net/net.c
+++ b/net/net.c
@@ -1587,7 +1587,7 @@ int string_to_enet_addr(const char *str, char *enetaddr)
ulong reg;
char *e;
- if (strlen(str) != 17)
+ if (!str || strlen(str) != 17)
return -1;
if (str[2] != ':' || str[5] != ':' || str[8] != ':' ||