upstream backup servers index out of bounds
--- a/src/http/ngx_http_upstream_round_robin.c 2012-12-11 00:35:32.000000000 +0800
+++ b/src/http/ngx_http_upstream_round_robin.c 2012-12-13 14:41:45.050418212 +0800
@@ -474,7 +474,8 @@
rrp->peers = peers->next;
pc->tries = rrp->peers->number;
- n = rrp->peers->number / (8 * sizeof(uintptr_t)) + 1;
+ n = (rrp->peers->number + (8 * sizeof(uintptr_t) - 1))
+ / (8 * sizeof(uintptr_t));
for (i = 0; i < n; i++) {
rrp->tried[i] = 0;
}
Change History
(5)
Owner: |
set to Valentin V. Bartenev
|
Status: |
accepted → assigned
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
In 4992/nginx:
(The changeset message doesn't reference this ticket)