From: Ruslan Ermilov Date: Tue, 2 Oct 2018 10:32:52 +0000 (+0300) Subject: Fixed off-by-one error in shared zone initialization. X-Git-Tag: release-1.15.5~2 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=df0dfa634d54904ea9e0714547547131a6b2da10;p=nginx.git Fixed off-by-one error in shared zone initialization. On systems without atomic ops, not enough space was allocated for mutex's file name during shared zone initialization. --- diff --git a/src/core/ngx_cycle.c b/src/core/ngx_cycle.c index f3ac24d7a..083c76488 100644 --- a/src/core/ngx_cycle.c +++ b/src/core/ngx_cycle.c @@ -921,7 +921,8 @@ ngx_init_zone_pool(ngx_cycle_t *cycle, ngx_shm_zone_t *zn) #else - file = ngx_pnalloc(cycle->pool, cycle->lock_file.len + zn->shm.name.len); + file = ngx_pnalloc(cycle->pool, + cycle->lock_file.len + zn->shm.name.len + 1); if (file == NULL) { return NGX_ERROR; }