From 2d197a9d39d57890a5cad33c5f951b3148489c94 Mon Sep 17 00:00:00 2001 From: Maxim Dounin Date: Fri, 29 Mar 2013 17:59:41 +0000 Subject: [PATCH] Merge of r5129: split clients configuration parsing. Split clients: check length when parsing configuration. --- src/http/modules/ngx_http_split_clients_module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http/modules/ngx_http_split_clients_module.c b/src/http/modules/ngx_http_split_clients_module.c index 992f6de7c..2f92c9e1a 100644 --- a/src/http/modules/ngx_http_split_clients_module.c +++ b/src/http/modules/ngx_http_split_clients_module.c @@ -218,7 +218,7 @@ ngx_http_split_clients(ngx_conf_t *cf, ngx_command_t *dummy, void *conf) part->percent = 0; } else { - if (value[0].data[value[0].len - 1] != '%') { + if (value[0].len == 0 || value[0].data[value[0].len - 1] != '%') { goto invalid; }