From 17f6a6033f1053f43048570b02e5aac158278260 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Tue, 6 Jul 1999 04:38:12 +0000 Subject: gethostname() is safe --- sbin/ipf/parse.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sbin/ipf/parse.c b/sbin/ipf/parse.c index ba5f6a99277..79372c41d3f 100644 --- a/sbin/ipf/parse.c +++ b/sbin/ipf/parse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.c,v 1.25 1999/07/05 20:12:44 kjell Exp $ */ +/* $OpenBSD: parse.c,v 1.26 1999/07/06 04:38:11 deraadt Exp $ */ /* * Copyright (C) 1993-1998 by Darren Reed. * @@ -36,7 +36,7 @@ #if !defined(lint) static const char sccsid[] ="@(#)parse.c 1.44 6/5/96 (C) 1993-1996 Darren Reed"; -static const char rcsid[] = "@(#)$Id: parse.c,v 1.25 1999/07/05 20:12:44 kjell Exp $"; +static const char rcsid[] = "@(#)$Id: parse.c,v 1.26 1999/07/06 04:38:11 deraadt Exp $"; #endif extern struct ipopt_names ionames[], secclass[]; @@ -69,11 +69,9 @@ u_char flags[] = { TH_FIN, TH_SYN, TH_RST, TH_PUSH, TH_ACK, TH_URG }; static char thishost[MAXHOSTNAMELEN]; - void initparse() { gethostname(thishost, sizeof(thishost)); - thishost[sizeof(thishost) - 1] = '\0'; } -- cgit v1.2.3