mirror of
https://github.com/nginx/nginx.git
synced 2024-12-18 21:23:36 -06:00
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.
This commit is contained in:
parent
a50dec6d6a
commit
df0dfa634d
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user