From be570879b32ff14ff99f617055bb1f84046a522c Mon Sep 17 00:00:00 2001 From: Mats O Jansson Date: Tue, 11 Feb 2003 01:08:28 +0000 Subject: Fix bug 3088 in a different way. Reported by bob at cemetery dot homeunix dot org. -moj ok deraadt@ --- usr.sbin/ypserv/stdhosts/stdhosts.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/ypserv/stdhosts/stdhosts.c b/usr.sbin/ypserv/stdhosts/stdhosts.c index 95082b861c3..856b81df94c 100644 --- a/usr.sbin/ypserv/stdhosts/stdhosts.c +++ b/usr.sbin/ypserv/stdhosts/stdhosts.c @@ -1,4 +1,4 @@ -/* $OpenBSD: stdhosts.c,v 1.8 2002/07/19 02:38:40 deraadt Exp $ */ +/* $OpenBSD: stdhosts.c,v 1.9 2003/02/11 01:08:27 maja Exp $ */ /* * Copyright (c) 1994 Mats O Jansson @@ -32,7 +32,7 @@ */ #ifndef LINT -static char rcsid[] = "$OpenBSD: stdhosts.c,v 1.8 2002/07/19 02:38:40 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: stdhosts.c,v 1.9 2003/02/11 01:08:27 maja Exp $"; #endif #include @@ -127,8 +127,8 @@ main(int argc, char *argv[]) while (*p != '\0') /* find end of string */ p++; - (void)inet_aton(k, &host_addr); - printf("%s %s\n", inet_ntoa(host_addr),v); + if (inet_aton(k, &host_addr)) + printf("%s %s\n", inet_ntoa(host_addr),v); } return(0); } -- cgit v1.2.3