diff options
author | Ruslan Ermilov <ru@nginx.com> | 2013-03-21 16:06:53 +0000 |
---|---|---|
committer | Ruslan Ermilov <ru@nginx.com> | 2013-03-21 16:06:53 +0000 |
commit | 275a35c2d0ce6f8cdff5590adf7cc19ee35da857 (patch) | |
tree | 94072f821b887729ead006d83255872250e476f8 /src/http/modules/ngx_http_split_clients_module.c | |
parent | 0ce62130cb00b6f886cb2da67ba54789a90cf375 (diff) | |
download | nginx-275a35c2d0ce6f8cdff5590adf7cc19ee35da857.tar.gz nginx-275a35c2d0ce6f8cdff5590adf7cc19ee35da857.zip |
Split clients: check length when parsing configuration.
Diffstat (limited to 'src/http/modules/ngx_http_split_clients_module.c')
-rw-r--r-- | src/http/modules/ngx_http_split_clients_module.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |