Mercurial > hg > nginx
comparison src/http/modules/ngx_http_split_clients_module.c @ 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 | 05beaa2d87b3 |
children |
comparison
equal
deleted
inserted
replaced
5159:94c349e3589d | 5160:ab992c25770c |
---|---|
216 | 216 |
217 if (value[0].len == 1 && value[0].data[0] == '*') { | 217 if (value[0].len == 1 && value[0].data[0] == '*') { |
218 part->percent = 0; | 218 part->percent = 0; |
219 | 219 |
220 } else { | 220 } else { |
221 if (value[0].data[value[0].len - 1] != '%') { | 221 if (value[0].len == 0 || value[0].data[value[0].len - 1] != '%') { |
222 goto invalid; | 222 goto invalid; |
223 } | 223 } |
224 | 224 |
225 n = ngx_atofp(value[0].data, value[0].len - 1, 2); | 225 n = ngx_atofp(value[0].data, value[0].len - 1, 2); |
226 if (n == NGX_ERROR || n == 0) { | 226 if (n == NGX_ERROR || n == 0) { |