diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-03-17 06:20:26 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-03-17 06:20:26 +0000 |
commit | 55672dc58bfe6ac470a13102dc664ab128e500bb (patch) | |
tree | 55d30285bd942a914317dc5bc393014ce5e9554b /lib/libc/net/ethers.c | |
parent | beacdac860a6d5d8da6b331ceead8333e382cfe1 (diff) |
Whoops, fix a last minute change.
Diffstat (limited to 'lib/libc/net/ethers.c')
-rw-r--r-- | lib/libc/net/ethers.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/libc/net/ethers.c b/lib/libc/net/ethers.c index aa2d99c0a37..d7b0b32f13d 100644 --- a/lib/libc/net/ethers.c +++ b/lib/libc/net/ethers.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ethers.c,v 1.5 1998/03/17 06:16:55 millert Exp $ */ +/* $OpenBSD: ethers.c,v 1.6 1998/03/17 06:20:25 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.5 1998/03/17 06:16:55 millert Exp $"; +static char rcsid[] = "$OpenBSD: ethers.c,v 1.6 1998/03/17 06:20:25 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -126,8 +126,10 @@ ether_ntohost(hostname, 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) - return (NULL); + e->ether_addr_octet[4] > 0xFF || e->ether_addr_octet[5] > 0xFF) { + errno = EINVAL; + return (-1); + } #ifdef YP char trybuf[sizeof("xx:xx:xx:xx:xx:xx")]; |