changeset 5128:b78cf2414fda

Split clients: check length when parsing configuration.
author Ruslan Ermilov <ru@nginx.com>
date Thu, 21 Mar 2013 16:06:53 +0000
parents a33b8c3aa975
children 96ee76fda991
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;
         }