aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-01-19 16:42:14 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-01-19 16:42:14 +0000
commitcd55a93cce4204a1b4ea5b16391d5ce8380f5997 (patch)
tree9f5578e8b37346d874d0959934e0d4973d2e94e5 /src
parentf39bca4281058bce73d5611360f52f9601ecd662 (diff)
downloadnginx-cd55a93cce4204a1b4ea5b16391d5ce8380f5997.tar.gz
nginx-cd55a93cce4204a1b4ea5b16391d5ce8380f5997.zip
fix segfault when geo range replaces starting part of another range
Diffstat (limited to 'src')
-rw-r--r--src/http/modules/ngx_http_geo_module.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/http/modules/ngx_http_geo_module.c b/src/http/modules/ngx_http_geo_module.c
index 5535eb299..bd6499ec7 100644
--- 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, ngx_http_geo_conf_ctx_t *ctx,
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);