diff options
author | sumikawa <sumikawa@FreeBSD.org> | 2001-04-02 05:33:20 +0000 |
---|---|---|
committer | sumikawa <sumikawa@FreeBSD.org> | 2001-04-02 05:33:20 +0000 |
commit | 5bc46345dea6df8b774f6cbb77fb39d568458e18 (patch) | |
tree | bf8537ca186e4d2422e72da62d80f900019ddb72 /www/apache13+ipv6 | |
parent | 7d748f3efc7abe07feed42631b073081088d1382 (diff) | |
download | FreeBSD-ports-5bc46345dea6df8b774f6cbb77fb39d568458e18.zip FreeBSD-ports-5bc46345dea6df8b774f6cbb77fb39d568458e18.tar.gz |
Add official patch to not coredump on missing ServerName
PR: 26237
Submitted by: Scot W. Hetzel <hetzels@westbend.net>
Diffstat (limited to 'www/apache13+ipv6')
-rw-r--r-- | www/apache13+ipv6/Makefile | 2 | ||||
-rw-r--r-- | www/apache13+ipv6/files/patch-util.c | 31 |
2 files changed, 32 insertions, 1 deletions
diff --git a/www/apache13+ipv6/Makefile b/www/apache13+ipv6/Makefile index 9485b93..2b2e559 100644 --- a/www/apache13+ipv6/Makefile +++ b/www/apache13+ipv6/Makefile @@ -7,7 +7,7 @@ PORTNAME= apache+ipv6 PORTVERSION= 1.3.19 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= www ipv6 MASTER_SITES= http://www.apache.org/dist/ \ ftp://ftp.ccs.neu.edu/net/mirrors/ftp.apache.org/apache/dist/ \ diff --git a/www/apache13+ipv6/files/patch-util.c b/www/apache13+ipv6/files/patch-util.c new file mode 100644 index 0000000..4c5b12a --- /dev/null +++ b/www/apache13+ipv6/files/patch-util.c @@ -0,0 +1,31 @@ +--- src/main/util.c.orig Mon Apr 2 13:21:27 2001 ++++ src/main/util.c Mon Apr 2 13:21:28 2001 +@@ -2048,12 +2048,14 @@ + int x; + + if (!strchr(p->h_name, '.')) { +- for (x = 0; p->h_aliases[x]; ++x) { +- if (strchr(p->h_aliases[x], '.') && +- (!strncasecmp(p->h_aliases[x], p->h_name, strlen(p->h_name)))) +- return ap_pstrdup(a, p->h_aliases[x]); +- } +- return NULL; ++ if (p->h_aliases) { ++ for (x = 0; p->h_aliases[x]; ++x) { ++ if (p->h_aliases[x] && strchr(p->h_aliases[x], '.') && ++ (!strncasecmp(p->h_aliases[x], p->h_name, strlen(p->h_name)))) ++ return ap_pstrdup(a, p->h_aliases[x]); ++ } ++ } ++ return NULL; + } + return ap_pstrdup(a, (void *) p->h_name); + } +@@ -2077,7 +2079,6 @@ + ap_log_error(APLOG_MARK, APLOG_WARNING, NULL, + "%s: gethostname() failed to determine ServerName\n", + ap_server_argv0); +- server_hostname = ap_pstrdup(a, "127.0.0.1"); + } + else + { |