]> git.kaiwu.me - nginx.git/commit
Proxy: fixed possible uninitialized memory access.
authorValentin Bartenev <vbart@nginx.com>
Sun, 17 Nov 2013 23:06:45 +0000 (03:06 +0400)
committerValentin Bartenev <vbart@nginx.com>
Sun, 17 Nov 2013 23:06:45 +0000 (03:06 +0400)
commitb53306815ecb226c6ae0dd9729a7a0af0043b4d4
tree42fde5a86f09bd8384271f3c44fa41522209dba5
parent58e26b88b774bbffbcd54bfc2de57a1b902ed4dd
Proxy: fixed possible uninitialized memory access.

The ngx_http_proxy_rewrite_cookie() function expects the value of the
"Set-Cookie" header to be null-terminated, and for headers obtained
from proxied server it is usually true.

Now the ngx_http_proxy_rewrite() function preserves the null character
while rewriting headers.

This fixes accessing memory outside of rewritten value if both the
"proxy_cookie_path" and "proxy_cookie_domain" directives are used in
the same location.
src/http/modules/ngx_http_proxy_module.c