mirror of
https://github.com/nginx/nginx.git
synced 2024-12-12 02:09:04 +08:00
fix segfault when geo range replaces starting part of another range
This commit is contained in:
parent
f39bca4281
commit
cd55a93cce
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user