Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@nginx.com>2018-10-02 13:32:52 +0300
committerRuslan Ermilov <ru@nginx.com>2018-10-02 13:32:52 +0300
commitdf0dfa634d54904ea9e0714547547131a6b2da10 (patch)
treea4f912d040f780df5e723a8f19f211c3e4d78981 /src/core/ngx_cycle.c
parenta50dec6d6ac480b70b4fdf51507a1eda8a015e1b (diff)
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.
Diffstat (limited to 'src/core/ngx_cycle.c')
-rw-r--r--src/core/ngx_cycle.c3
1 files changed, 2 insertions, 1 deletions
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;
}