diff --git a/sapi/fpm/fpm/fpm_conf.c b/sapi/fpm/fpm/fpm_conf.c index 3979d875a18e..a13c91e8facc 100644 --- a/sapi/fpm/fpm/fpm_conf.c +++ b/sapi/fpm/fpm/fpm_conf.c @@ -972,7 +972,8 @@ static int fpm_conf_process_all_pools(void) return -1; } - for (i = 0; i < strlen(status); i++) { + size_t status_len = strlen(status); + for (i = 0; i < status_len; i++) { if (!isalnum(status[i]) && status[i] != '/' && status[i] != '-' && status[i] != '_' && status[i] != '.' && status[i] != '~') { zlog(ZLOG_ERROR, "[pool %s] the status path '%s' must contain only the following characters '[alphanum]/_-.~'", wp->config->name, status); return -1; @@ -995,7 +996,8 @@ static int fpm_conf_process_all_pools(void) return -1; } - for (i = 0; i < strlen(ping); i++) { + size_t ping_len = strlen(ping); + for (i = 0; i < ping_len; i++) { if (!isalnum(ping[i]) && ping[i] != '/' && ping[i] != '-' && ping[i] != '_' && ping[i] != '.' && ping[i] != '~') { zlog(ZLOG_ERROR, "[pool %s] the ping path '%s' must contain only the following characters '[alphanum]/_-.~'", wp->config->name, ping); return -1;