changeset 5160:ab992c25770c stable-1.2

Merge of r5129: split clients configuration parsing. Split clients: check length when parsing configuration.
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 29 Mar 2013 17:59:41 +0000
parents 94c349e3589d
children a5f7d455e271
files src/http/modules/ngx_http_split_clients_module.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;
         }