diff options
-rw-r--r-- | modules/mappers/mod_imap.c | 6 | ||||
-rw-r--r-- | modules/mappers/mod_userdir.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/modules/mappers/mod_imap.c b/modules/mappers/mod_imap.c index c803ceb193..f32ccbb8e8 100644 --- a/modules/mappers/mod_imap.c +++ b/modules/mappers/mod_imap.c @@ -288,14 +288,14 @@ static double get_x_coord(const char *args) static double get_y_coord(const char *args) { char *endptr; /* we want it non-null */ - char *start_of_y = NULL; + const char *start_of_y = NULL; double y_coord = -1; /* -1 is returned on error */ if (args == NULL) { return (-1); /* in case we aren't passed anything */ } - start_of_y = strchr(args, ','); /* the comma */ + start_of_y = ap_strchr_c(args, ','); /* the comma */ if (start_of_y) { @@ -411,7 +411,7 @@ static char *imap_url(request_rec *r, const char *base, const char *value) } /* must be a relative URL to be combined with base */ - if (strchr(base, '/') == NULL && (!strncmp(value, "../", 3) + if (ap_strchr_c(base, '/') == NULL && (!strncmp(value, "../", 3) || !strcmp(value, ".."))) { ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r, "invalid base directive in map file: %s", r->uri); diff --git a/modules/mappers/mod_userdir.c b/modules/mappers/mod_userdir.c index 911d9e8b2c..7e83bb1fb3 100644 --- a/modules/mappers/mod_userdir.c +++ b/modules/mappers/mod_userdir.c @@ -135,7 +135,7 @@ static void *create_userdir_config(ap_pool_t *p, server_rec *s) #define O_ENABLE 1 #define O_DISABLE 2 -static const char *set_user_dir(cmd_parms *cmd, void *dummy, char *arg) +static const char *set_user_dir(cmd_parms *cmd, void *dummy, const char *arg) { userdir_config * s_cfg = (userdir_config *) ap_get_module_config @@ -270,7 +270,7 @@ static int translate_userdir(request_rec *r) const char *userdir = ap_getword_conf(r->pool, &userdirs); char *filename = NULL; - if (strchr(userdir, '*')) + if (ap_strchr_c(userdir, '*')) x = ap_getword(r->pool, &userdir, '*'); if (userdir[0] == '\0' || ap_os_is_path_absolute(userdir)) { @@ -297,7 +297,7 @@ static int translate_userdir(request_rec *r) else filename = ap_pstrcat(r->pool, userdir, "/", w, NULL); } - else if (strchr(userdir, ':')) { + else if (ap_strchr_c(userdir, ':')) { redirect = ap_pstrcat(r->pool, userdir, "/", w, dname, NULL); ap_table_setn(r->headers_out, "Location", redirect); return REDIRECT; |