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-Tag: 2.0.30~133 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=34dd63965e602ee4204a1bfa460f15aea51fd272;p=thirdparty%2Fapache%2Fhttpd.git 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 e2592acbce6..e257262ea8d 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 ce1a130b868..9bb5677127d 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"; }