From: Jim Jagielski Date: Mon, 29 Oct 2007 13:13:17 +0000 (+0000) Subject: Merge r589177 from trunk: X-Git-Tag: 2.2.7~276 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b354e15c61ed8450b8dbe99e57560fd371d1d517;p=thirdparty%2Fapache%2Fhttpd.git Merge r589177 from trunk: Fix possible crash at startup in case of nonexistent DocumentRoot. PR#39722 Submitted by: niq Reviewed by: jim git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@589618 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index a67046951a5..12e6522ebf3 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.2.7 + *) Core: fix possible crash at startup in case of nonexistent DocumentRoot. + PR 39722 [Adrian Buckley ] + *) HTTP protocol: Add "DefaultType none" option. PR 13986 and PR 16139 [Nick Kew] diff --git a/STATUS b/STATUS index bf22e445ece..a9632c84a9c 100644 --- a/STATUS +++ b/STATUS @@ -79,10 +79,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * Core: Fix possible crash at startup in case of nonexistent DocumentRoot. - PR 39722 - http://svn.apache.org/viewvc?view=rev&revision=589177 - +1: niq, rpluem, jim PATCHES PROPOSED TO BACKPORT FROM TRUNK: [ New proposals should be added at the end of the list ] diff --git a/server/core.c b/server/core.c index b4aca33b409..5ba897d9f8f 100644 --- a/server/core.c +++ b/server/core.c @@ -1173,6 +1173,9 @@ static const char *set_document_root(cmd_parms *cmd, void *dummy, /* Make it absolute, relative to ServerRoot */ arg = ap_server_root_relative(cmd->pool, arg); + if (arg == NULL) { + return "DocumentRoot must be a directory"; + } /* TODO: ap_configtestonly && ap_docrootcheck && */ if (apr_filepath_merge((char**)&conf->ap_document_root, NULL, arg,