Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed off-by-one bug in the calculation of shm_name->len
  • Loading branch information
mikegagnon committed Apr 7, 2012
1 parent 5f6a3b7 commit 3a1d882
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ngx_http_upstream_fair_module.c
Expand Up @@ -610,7 +610,7 @@ ngx_http_upstream_init_fair(ngx_conf_t *cf, ngx_http_upstream_srv_conf_t *us)
n = peers->number;

shm_name = ngx_palloc(cf->pool, sizeof *shm_name);
shm_name->len = sizeof("upstream_fair");
shm_name->len = sizeof("upstream_fair") - 1;
shm_name->data = (unsigned char *) "upstream_fair";

if (ngx_http_upstream_fair_shm_size == 0) {
Expand Down

0 comments on commit 3a1d882

Please sign in to comment.