# HG changeset patch # User Ruslan Ermilov # Date 1363882013 0 # Node ID b78cf2414fdaf9645ff2e697147f45b610e43904 # Parent a33b8c3aa9754fadfc8c38f9d10a453d5b2ea6bc Split clients: check length when parsing configuration. diff --git a/src/http/modules/ngx_http_split_clients_module.c b/src/http/modules/ngx_http_split_clients_module.c --- 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, n 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; }