diff options
Diffstat (limited to 'net/net.c')
-rw-r--r-- | net/net.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -166,8 +166,10 @@ int string_to_ethaddr(const char *str, char *enetaddr) int reg; char *e; - if (!str || strlen(str) != 17) - return -1; + if (!str || strlen(str) != 17) { + memset(enetaddr, 0, 6); + return -1; + } if (str[2] != ':' || str[5] != ':' || str[8] != ':' || str[11] != ':' || str[14] != ':') |