mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-17 22:56:18 +03:00
make rootpath and incpath consts so apr_filepath_root doesn't cause incompatible pointer type
This commit is contained in:
parent
1121ef0bed
commit
4919814a5c
@ -1028,7 +1028,8 @@ const char *process_command_config(server_rec *s,
|
|||||||
ap_directive_t *newdir;
|
ap_directive_t *newdir;
|
||||||
int optional;
|
int optional;
|
||||||
char *err = NULL;
|
char *err = NULL;
|
||||||
char *rootpath, *incpath;
|
const char *rootpath, *incpath;
|
||||||
|
char *configfilepath;
|
||||||
int li;
|
int li;
|
||||||
|
|
||||||
errmsg = populate_include_files(p, ptemp, ari, filename, 0);
|
errmsg = populate_include_files(p, ptemp, ari, filename, 0);
|
||||||
@ -1108,13 +1109,13 @@ ProcessInclude:
|
|||||||
|
|
||||||
/* we allow APR_SUCCESS and APR_EINCOMPLETE */
|
/* we allow APR_SUCCESS and APR_EINCOMPLETE */
|
||||||
if (APR_ERELATIVE == status) {
|
if (APR_ERELATIVE == status) {
|
||||||
rootpath = apr_pstrdup(ptemp, parms->config_file->name);
|
configfilepath = apr_pstrdup(ptemp, parms->config_file->name);
|
||||||
li = strlen(rootpath) - 1;
|
li = strlen(configfilepath) - 1;
|
||||||
|
|
||||||
while(li >= 0 && rootpath[li] != '/' && rootpath[li] != '\\')
|
while(li >= 0 && configfilepath[li] != '/' && configfilepath[li] != '\\')
|
||||||
rootpath[li--] = 0;
|
configfilepath[li--] = 0;
|
||||||
|
|
||||||
w = apr_pstrcat(p, rootpath, w, NULL);
|
w = apr_pstrcat(p, configfilepath, w, NULL);
|
||||||
}
|
}
|
||||||
else if (APR_EBADPATH == status) {
|
else if (APR_EBADPATH == status) {
|
||||||
ap_cfg_closefile(parms->config_file);
|
ap_cfg_closefile(parms->config_file);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user