summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/net/ethers.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/libc/net/ethers.c b/lib/libc/net/ethers.c
index d7b0b32f13d..2dec56cf39e 100644
--- a/lib/libc/net/ethers.c
+++ b/lib/libc/net/ethers.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ethers.c,v 1.6 1998/03/17 06:20:25 millert Exp $ */
+/* $OpenBSD: ethers.c,v 1.7 1998/03/17 06:22:00 millert Exp $ */
/*
* Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -37,7 +37,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: ethers.c,v 1.6 1998/03/17 06:20:25 millert Exp $";
+static char rcsid[] = "$OpenBSD: ethers.c,v 1.7 1998/03/17 06:22:00 millert Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -67,8 +67,10 @@ ether_ntoa(e)
if (e->ether_addr_octet[0] > 0xFF || e->ether_addr_octet[1] > 0xFF ||
e->ether_addr_octet[2] > 0xFF || e->ether_addr_octet[3] > 0xFF ||
- e->ether_addr_octet[4] > 0xFF || e->ether_addr_octet[5] > 0xFF)
+ e->ether_addr_octet[4] > 0xFF || e->ether_addr_octet[5] > 0xFF) {
+ errno = EINVAL;
return (NULL);
+ }
(void)sprintf(a, "%02x:%02x:%02x:%02x:%02x:%02x",
e->ether_addr_octet[0], e->ether_addr_octet[1],