]> git.kaiwu.me - nginx.git/commitdiff
fix segfault
authorIgor Sysoev <igor@sysoev.ru>
Mon, 22 Oct 2007 10:15:27 +0000 (10:15 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Mon, 22 Oct 2007 10:15:27 +0000 (10:15 +0000)
src/http/modules/ngx_http_charset_filter_module.c

index 8c9fad6f93ce44c9fc85133b21b5527a9e270d58..f7d9906a86b206b2e6b5a56cf6ad18707dd055c6 100644 (file)
@@ -1462,6 +1462,12 @@ ngx_http_charset_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
         return NGX_CONF_OK;
     }
 
+    if (conf->source_charset >= NGX_HTTP_CHARSET_VAR
+        || conf->charset >= NGX_HTTP_CHARSET_VAR)
+    {
+        return NGX_CONF_OK;
+    }
+
     mcf = ngx_http_conf_get_module_main_conf(cf,
                                              ngx_http_charset_filter_module);
     recode = mcf->recodes.elts;