mirror of
https://github.com/nginx/nginx.git
synced 2026-09-06 05:19:28 +00:00
Fixed excessive memory usage while parsing configuration.
The b->pos points to the next symbol here. Reported by ilexshen.
This commit is contained in:
parent
b65cfbb3bb
commit
66f6ba5c95
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue