Welcome! Log In Create A New Profile

Advanced

[nginx] Fixed off-by-one error in shared zone initialization.

October 02, 2018 06:36AM
details: http://hg.nginx.org/nginx/rev/7bf3c323cb6e
branches:
changeset: 7366:7bf3c323cb6e
user: Ruslan Ermilov <ru@nginx.com>
date: Tue Oct 02 13:32:52 2018 +0300
description:
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:

src/core/ngx_cycle.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

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 @@ 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;
}
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Fixed off-by-one error in shared zone initialization.

ru@nginx.com 158 October 02, 2018 06:36AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 71
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready