Permalink
Browse files

Merge pull request #8 from mikegagnon/master

fixed off-by-one bug in the calculation of shm_name->len
2 parents 5f6a3b7 + 3a1d882 commit a18b4099fbd458111983200e098b6f0c8efed4bc @gnosek committed Apr 8, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 ngx_http_upstream_fair_module.c
View
2 ngx_http_upstream_fair_module.c
@@ -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) {

0 comments on commit a18b409

Please sign in to comment.