]> git.kaiwu.me - nginx.git/commitdiff
Proxy: clear script engine used to calculate lengths.
authorMaxim Dounin <mdounin@mdounin.ru>
Wed, 15 May 2013 08:23:44 +0000 (12:23 +0400)
committerMaxim Dounin <mdounin@mdounin.ru>
Wed, 15 May 2013 08:23:44 +0000 (12:23 +0400)
Previous code is believed to be safe, but might access uninitialized
memory (e.g., e->quote).

src/http/modules/ngx_http_proxy_module.c

index 88e41e0db4b51cb182368ff0ec5f4566a45a3e98..d5cf07d0bcc7437378e352578a89f16fe890e935 100644 (file)
@@ -993,6 +993,8 @@ ngx_http_proxy_create_request(ngx_http_request_t *r)
 
     len += uri_len;
 
+    ngx_memzero(&le, sizeof(ngx_http_script_engine_t));
+
     ngx_http_script_flush_no_cacheable_variables(r, plcf->flushes);
 
     if (plcf->body_set_len) {