diff options
author | William A. Rowe Jr <wrowe@apache.org> | 2002-03-16 19:26:58 +0100 |
---|---|---|
committer | William A. Rowe Jr <wrowe@apache.org> | 2002-03-16 19:26:58 +0100 |
commit | 65a37752ec30e81ebf8b41d679fd031a23b45f84 (patch) | |
tree | c386dd974ba944fc1e55885cbcae317077bf390c /server/core.c | |
parent | Silly module, we don't need compat.h :) (diff) | |
download | apache2-65a37752ec30e81ebf8b41d679fd031a23b45f84.tar.xz apache2-65a37752ec30e81ebf8b41d679fd031a23b45f84.zip |
Eliminate potential ap_server_root_relative segfaults, with the input
of Jeff Trawick's style changes to the first patches. Doesn't include
the fixes to ssl [more complex], and we won't trap errors that involve
ap_serverroot, since we presume that was normalized on the way in.
Therefore, testing ap_server_root_relative(DEFAULT_FOO) cases
should never become necessary.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93965 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/core.c')
-rw-r--r-- | server/core.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/server/core.c b/server/core.c index 279463caa5..7fb15c518f 100644 --- a/server/core.c +++ b/server/core.c @@ -1364,15 +1364,15 @@ static const char *set_etag_bits(cmd_parms *cmd, void *mconfig, bit = ETAG_INODE; } else { - return ap_pstrcat(cmd->pool, "Unknown keyword '", - token, "' for ", cmd->cmd->name, - " directive", NULL); + return apr_pstrcat(cmd->pool, "Unknown keyword '", + token, "' for ", cmd->cmd->name, + " directive", NULL); } if (! valid) { - return ap_pstrcat(cmd->pool, cmd->cmd->name, " keyword '", - token, "' cannot be used with '+' or '-'", - NULL); + return apr_pstrcat(cmd->pool, cmd->cmd->name, " keyword '", + token, "' cannot be used with '+' or '-'", + NULL); } if (action == '+') { @@ -2126,9 +2126,14 @@ static const char *include_config (cmd_parms *cmd, void *dummy, const char *name) { ap_directive_t *conftree = NULL; + const char* conffile = ap_server_root_relative(cmd->pool, name); + + if (!conffile) { + return apr_pstrcat(cmd->pool, "Invalid Include path ", + name, NULL); + } - ap_process_resource_config(cmd->server, - ap_server_root_relative(cmd->pool, name), + ap_process_resource_config(cmd->server, conffile, &conftree, cmd->pool, cmd->temp_pool); *(ap_directive_t **)dummy = conftree; return NULL; |