From: Ruslan Ermilov Date: Thu, 21 Mar 2013 16:06:53 +0000 (+0000) Subject: Split clients: check length when parsing configuration. X-Git-Tag: release-1.3.15~10 X-Git-Url: http://www.kaiwu.me/postgresql/commit/static/gitweb.js?a=commitdiff_plain;h=275a35c2d0ce6f8cdff5590adf7cc19ee35da857;p=nginx.git 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 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; }