]> git.kaiwu.me - nginx.git/commit
Fixed regex captures handling without PCRE.
authorVladimir Homutov <vl@nginx.com>
Wed, 6 Jul 2016 11:33:40 +0000 (14:33 +0300)
committerVladimir Homutov <vl@nginx.com>
Wed, 6 Jul 2016 11:33:40 +0000 (14:33 +0300)
commit161fcf4bddca789b15dcf22b1e1d80cdabc24114
treee401444fe5692dd1d84f423f994ee2bf7bc70b32
parent74305af6727afc0c737a8e993d5cd9183c5c71d2
Fixed regex captures handling without PCRE.

If PCRE is disabled, captures were treated as normal variables in
ngx_http_script_compile(), while code calculating flushes array length in
ngx_http_compile_complex_value() did not account captures as variables.
This could lead to write outside of the array boundary when setting
last element to -1.

Found with AddressSanitizer.
src/http/ngx_http_script.c
src/stream/ngx_stream_script.c