Mercurial > hg > nginx
changeset 6247:fbbb1c1ce1eb
Sub filter: fixed initialization in http{} level (ticket #791).
If sub_filter directive was only specified at http{} level, sub filter
internal data remained uninitialized. That would lead to a crash in runtime.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Mon, 21 Sep 2015 23:08:34 +0300 |
parents | 257b51c37c5a |
children | f5380c244cd7 |
files | src/http/modules/ngx_http_sub_filter_module.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_sub_filter_module.c Fri Sep 11 20:13:06 2015 +0300 +++ b/src/http/modules/ngx_http_sub_filter_module.c Mon Sep 21 23:08:34 2015 +0300 @@ -853,8 +853,9 @@ conf->pairs = prev->pairs; conf->matches = prev->matches; conf->tables = prev->tables; + } - } else if (conf->dynamic == 0){ + if (conf->pairs && conf->dynamic == 0 && conf->tables == NULL) { pairs = conf->pairs->elts; n = conf->pairs->nelts;