Klaus Demo nginx / cd55a93
fix segfault when geo range replaces starting part of another range Igor Sysoev 13 years ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
635635
636636 range = a->elts;
637637
638 ngx_memcpy(&range[i + 2], &range[i + 1],
639 (a->nelts - 2 - i) * sizeof(ngx_http_geo_range_t));
638 ngx_memcpy(&range[i + 1], &range[i],
639 (a->nelts - 1 - i) * sizeof(ngx_http_geo_range_t));
640640
641641 range[i + 1].start = (u_short) (e + 1);
642642