# HG changeset patch # User Ruslan Ermilov # Date 1538476372 -10800 # Node ID 7bf3c323cb6e15e73dc612b56ee973d06ab15542 # Parent cd4fa2fab8d8f1a2d03841249230bed76d318502 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 --- a/src/core/ngx_cycle.c +++ b/src/core/ngx_cycle.c @@ -921,7 +921,8 @@ ngx_init_zone_pool(ngx_cycle_t *cycle, n #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; }