mirror of
https://github.com/nginx/nginx.git
synced 2026-08-04 14:58:20 +00: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
1 changed files with 2 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue