# 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 -r cd4fa2fab8d8 -r 7bf3c323cb6e src/core/ngx_cycle.c --- a/src/core/ngx_cycle.c Tue Sep 25 14:07:59 2018 +0300 +++ b/src/core/ngx_cycle.c Tue Oct 02 13:32:52 2018 +0300 @@ -921,7 +921,8 @@ #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; }