Mercurial > hg > nginx
changeset 2457:1aff348d9aa8
fix segfault when geo range replaces starting part of another range
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 19 Jan 2009 16:42:14 +0000 |
parents | d4b69804cffa |
children | 43dcf8cc2cb1 |
files | src/http/modules/ngx_http_geo_module.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_geo_module.c +++ b/src/http/modules/ngx_http_geo_module.c @@ -636,8 +636,8 @@ ngx_http_geo_add_range(ngx_conf_t *cf, n range = a->elts; - ngx_memcpy(&range[i + 2], &range[i + 1], - (a->nelts - 2 - i) * sizeof(ngx_http_geo_range_t)); + ngx_memcpy(&range[i + 1], &range[i], + (a->nelts - 1 - i) * sizeof(ngx_http_geo_range_t)); range[i + 1].start = (u_short) (e + 1);