Split clients: check length when parsing configuration.

This commit is contained in:
Ruslan Ermilov 2013-03-21 16:06:53 +00:00
parent 0ce62130cb
commit 275a35c2d0

View File

@ -218,7 +218,7 @@ ngx_http_split_clients(ngx_conf_t *cf, ngx_command_t *dummy, void *conf)
part->percent = 0; part->percent = 0;
} else { } else {
if (value[0].data[value[0].len - 1] != '%') { if (value[0].len == 0 || value[0].data[value[0].len - 1] != '%') {
goto invalid; goto invalid;
} }