You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Marc Slemko <ma...@znep.com> on 2000/01/12 08:58:04 UTC
Nit in util.c (fwd)
Any chance we could get this in before .10? Tiny change, but good for
consistency and easy of this-looks-correctness. Looks like the patch is
munged a bit, but the idea is obvious.
If not, no problem, I'll try to remember to put it in after.
---------- Forwarded message ----------
Date: Mon, 06 Dec 1999 10:30:37 -0700
From: Bob Beck <be...@bofh.ucs.ualberta.ca>
To: slemko@cs.ualberta.ca
Cc: deraadt@cvs.openbsd.org
Subject: Nit in util.c
Resent-Date: Mon, 6 Dec 1999 10:42:06 -0700 (MST)
Resent-From: Marc Slemko <sl...@ugrad.cs.ualberta.ca>
Resent-To: marcs@znep.com
Resent-Subject: Nit in util.c
Marc, could this perhaps find it's way back into apache?
Thanks,
-Bob
------- Forwarded Message
Return-Path: deraadt@cvs.openbsd.org
Return-Path: <de...@cvs.openbsd.org>
Received: (from uucp@localhost)
by bofh.ucs.ualberta.ca (8.8.8/8.8.8) id RAA02583
for <be...@bofh.ucs.ualberta.ca>; Sun, 5 Dec 1999 17:44:25 -0700 (MST)
Received: from cvs.openbsd.org(199.185.137.3)
via SMTP by bofh.ucs.ualberta.ca, id smtpddH8456; Sun Dec 5 17:44:16 1999
Received: (from root@localhost)
by cvs.openbsd.org (8.9.3/8.9.1) id RAA19478
for beck; Sun, 5 Dec 1999 17:40:51 -0700 (MST)
Date: Sun, 5 Dec 1999 17:40:51 -0700 (MST)
From: Theo de Raadt <de...@cvs.openbsd.org>
Message-Id: <19...@cvs.openbsd.org>
To: beck@cvs.openbsd.org
Subject: please send this to the right person, and cc me
Index: util.c
===================================================================
RCS file: /cvs/src/usr.sbin/httpd/src/main/util.c,v
retrieving revision 1.4
diff -u -r1.4 util.c
- --- util.c 1999/09/29 06:29:38 1.4
+++ util.c 1999/12/06 00:40:35
@@ -1934,7 +1934,7 @@
#ifndef MAXHOSTNAMELEN
#define MAXHOSTNAMELEN 256
#endif
- - char str[MAXHOSTNAMELEN + 1];
+ char str[MAXHOSTNAMELEN];
char *server_hostname;
struct hostent *p;
@@ -1946,7 +1946,7 @@
perror("Unable to gethostname");
exit(1);
}
- - str[MAXHOSTNAMELEN] = '\0';
+ str[sizeof(str)-1] = '\0';
if ((!(p = gethostbyname(str))) || (!(server_hostname = find_fqdn(a, p)))) {
fprintf(stderr, "%s: cannot determine local host name.\n",
ap_server_argv0);
------- End of Forwarded Message