]> granicus.if.org Git - apache/commitdiff
Fix possible crash at startup in case of nonexistent DocumentRoot.
authorNick Kew <niq@apache.org>
Sat, 27 Oct 2007 18:51:23 +0000 (18:51 +0000)
committerNick Kew <niq@apache.org>
Sat, 27 Oct 2007 18:51:23 +0000 (18:51 +0000)
PR#39722

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@589177 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
server/core.c

diff --git a/CHANGES b/CHANGES
index ff41efe51f0f17853cc74488de1e222dc7772169..353d27e61b6a71bb1f13179560874c6bca746e9c 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 Changes with Apache 2.3.0
 [ When backported to 2.2.x, remove entry from this file ]
 
+  *) Core: fix possible crash at startup in case of nonexistent DocumentRoot.
+     PR 39722 [Adrian Buckley <adrian.buckley ntlworld.com>]
+
   *) mod_proxy: add "nocanon" keyword to ProxyPass, to suppress
      URI-canonicalisation in a reverse proxy.
      PR 41798 [Nick Kew]
index 84b58726fae6dbb2b05fd6de2e81d1c37919e567..ab938d0469d3d822f42b296103c19ee497d701ab 100644 (file)
@@ -1164,6 +1164,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,