comparison src/http/modules/ngx_http_proxy_module.c @ 5211:ecd762770729

Proxy: clear script engine used to calculate lengths. Previous code is believed to be safe, but might access uninitialized memory (e.g., e->quote).
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 15 May 2013 12:23:44 +0400
parents bfb99b75833b
children 05c53652e7b4
comparison
equal deleted inserted replaced
5210:ea2ba6dbe361 5211:ecd762770729
990 "zero length URI to proxy"); 990 "zero length URI to proxy");
991 return NGX_ERROR; 991 return NGX_ERROR;
992 } 992 }
993 993
994 len += uri_len; 994 len += uri_len;
995
996 ngx_memzero(&le, sizeof(ngx_http_script_engine_t));
995 997
996 ngx_http_script_flush_no_cacheable_variables(r, plcf->flushes); 998 ngx_http_script_flush_no_cacheable_variables(r, plcf->flushes);
997 999
998 if (plcf->body_set_len) { 1000 if (plcf->body_set_len) {
999 le.ip = plcf->body_set_len->elts; 1001 le.ip = plcf->body_set_len->elts;