diff options
author | Valentin Bartenev <vbart@nginx.com> | 2015-06-01 21:08:56 +0300 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2015-06-01 21:08:56 +0300 |
commit | 66f6ba5c954af4e4bef314fad32e9de9f4329c52 (patch) | |
tree | 1ceb69cf800e0be19ec6fe30993acc863bdf4427 /src/core/ngx_conf_file.c | |
parent | b65cfbb3bb3c02b645eeeaccbdf6eb7be1d41dc2 (diff) | |
download | nginx-66f6ba5c954af4e4bef314fad32e9de9f4329c52.tar.gz nginx-66f6ba5c954af4e4bef314fad32e9de9f4329c52.zip |
Fixed excessive memory usage while parsing configuration.
The b->pos points to the next symbol here.
Reported by ilexshen.
Diffstat (limited to 'src/core/ngx_conf_file.c')
-rw-r--r-- | src/core/ngx_conf_file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/ngx_conf_file.c b/src/core/ngx_conf_file.c index ec3c1fae1..8273a7fcd 100644 --- a/src/core/ngx_conf_file.c +++ b/src/core/ngx_conf_file.c @@ -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; } |