summaryrefslogtreecommitdiff
path: root/www/nginx/files/extra-patch-naxsi_runtime.c
blob: 7d6a5a621b4dd6b5201cfe64ac13925964200793 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--- ../naxsi-0.46-1/naxsi_src/naxsi_runtime.c.orig	2012-07-03 20:58:17.000000000 +0400
+++ ../naxsi-0.46-1/naxsi_src/naxsi_runtime.c	2012-07-03 21:01:32.000000000 +0400
@@ -116,7 +116,12 @@
     tmp_idx = 0;
     len = str->len;
     while 
-#if defined nginx_version && (nginx_version > 1001011)
+#if defined nginx_version && (nginx_version > 1002001)
+      (tmp_idx < len && 
+       (match = pcre_exec(rl->br->rx->regex->code, 0, 
+			  (const char *) str->data, str->len, tmp_idx, 0, 
+			  captures, 6)) >= 0)
+#elif defined nginx_version && ((nginx_version > 1001011) && (nginx_version <= 1002001))
       (tmp_idx < len && 
        (match = pcre_exec(rl->br->rx->regex->pcre, 0, 
 			  (const char *) str->data, str->len, tmp_idx, 0,