# HG changeset patch
# User Roman Arutyunyan <arut@nginx.com>
# Date 1442836198 -10800
# Mon Sep 21 14:49:58 2015 +0300
# Node ID a58e3a3304e0a15092291d216dc1346b808d83ce
# Parent de3b5bc41b8623e6f3fd9f670e5a92fc1a84701e
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.
diff -r de3b5bc41b86 -r a58e3a3304e0 src/http/modules/ngx_http_sub_filter_module.c
|
a
|
b
|
ngx_http_sub_merge_conf(ngx_conf_t *cf,
|
| 853 | 853 | conf->pairs = prev->pairs; |
| 854 | 854 | conf->matches = prev->matches; |
| 855 | 855 | conf->tables = prev->tables; |
| | 856 | } |
| 856 | 857 | |
| 857 | | } else if (conf->dynamic == 0){ |
| | 858 | if (conf->pairs && conf->dynamic == 0 && conf->tables == NULL) { |
| 858 | 859 | pairs = conf->pairs->elts; |
| 859 | 860 | n = conf->pairs->nelts; |
| 860 | 861 | |