From: Brian Pane Date: Tue, 25 Dec 2001 21:41:59 +0000 (+0000) Subject: Fixed a segfault that occurred during startup if a VirtualHost X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4370c6750d966061a6b9192f955506b11854f50c;p=apache Fixed a segfault that occurred during startup if a VirtualHost directive had a port but no address Reported by: Don Hughes git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92599 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index e2592acbce..e257262ea8 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,7 @@ Changes with Apache 2.0.30-dev + *) Fixed startup segfault that occurred when a VirtualHost + directive had a port but no address [Brian Pane] + *) Allow htdbm to work with multiple DBM types [Ian Holsman] *) Win32: Made change to apr_sendfile() to return APR_ENOTIMPL diff --git a/server/vhost.c b/server/vhost.c index ce1a130b86..9bb5677127 100644 --- a/server/vhost.c +++ b/server/vhost.c @@ -209,6 +209,9 @@ static const char *get_addresses(apr_pool_t *p, const char *w_, if (rv != APR_SUCCESS) { return "The address or port is invalid"; } + if (!host) { + return "Missing address for VirtualHost"; + } if (scope_id) { return "Scope ids are not supported"; }