Welcome! Log In Create A New Profile

Advanced

[nginx] Fixed excessive memory usage while parsing configuration.

Valentin Bartenev
June 01, 2015 02:12PM
details: http://hg.nginx.org/nginx/rev/4e71788460fa
branches:
changeset: 6163:4e71788460fa
user: Valentin Bartenev <vbart@nginx.com>
date: Mon Jun 01 21:08:56 2015 +0300
description:
Fixed excessive memory usage while parsing configuration.

The b->pos points to the next symbol here.

Reported by ilexshen.

diffstat:

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

diffs (12 lines):

diff -r ab78c12412ce -r 4e71788460fa src/core/ngx_conf_file.c
--- a/src/core/ngx_conf_file.c Mon Jun 01 16:58:07 2015 +0300
+++ b/src/core/ngx_conf_file.c Mon Jun 01 21:08:56 2015 +0300
@@ -680,7 +680,7 @@ ngx_conf_read_token(ngx_conf_t *cf)
return NGX_ERROR;
}

- word->data = ngx_pnalloc(cf->pool, b->pos - start + 1);
+ word->data = ngx_pnalloc(cf->pool, b->pos - 1 - start + 1);
if (word->data == 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 excessive memory usage while parsing configuration.

Valentin Bartenev 563 June 01, 2015 02:12PM



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

Online Users

Guests: 248
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready