Avoids segfault while running with proxy_pass

Duplicates the headers variables while coping data from/to ModSecurity.
This seems to fix the segfault that was happening while using proxy_pass.
The variable is later cleaned, which means that we don't have a leak
because of that.
This commit is contained in:
Felipe Zimmerle
2015-03-21 11:50:48 -07:00
parent eb904c2666
commit d135f88254
2 changed files with 38 additions and 30 deletions

View File

@@ -6,21 +6,23 @@ CFLAGS="$CFLAGS \
-I/usr/include/apache2 \
-I/usr/include/libxml2 \
-DWITH_LUA -I/usr/include/lua5.1 \
-DWITH_PCRE_STUDY -DMODSEC_PCRE_MATCH_LIMIT=1500 -DMODSEC_PCRE_MATCH_LIMIT_RECURSION=1500 -DREQUEST_EARLY \
-DWITH_PCRE_STUDY -DMODSEC_PCRE_MATCH_LIMIT=1500 -DMODSEC_PCRE_MATCH_LIMIT_RECURSION=1500 -DREQUEST_EARLY -DWITH_APU_CRYPTO -DWITH_REMOTE_RULES \
\
-DWITH_YAJL -I/usr/include/yajl "
-DWITH_YAJL -I/usr/include/yajl \
-DWITH_SSDEEP -I/usr/"
CORE_LIBS="$CORE_LIBS \
-L/usr/lib -lapr-1 \
-L/usr/lib -laprutil-1 \
-L/usr/lib/x86_64-linux-gnu -lapr-1 \
-L/usr/lib/x86_64-linux-gnu -laprutil-1 \
-I/usr/include/apache2 \
-L/usr/lib/x86_64-linux-gnu -lcurl \
-lxml2 \
-llua5.1 \
-lpcre \
-L/usr/lib -lcap \
-lyajl "
-L/usr/lib \
-lyajl \
-lfuzzy"
ngx_addon_name=ngx_http_modsecurity