39 lines
1.3 KiB
Diff
39 lines
1.3 KiB
Diff
diff -ru modsecurity-apache_2.6.8/apache2/msc_util.c modsecurity-apache_2.6.8-patched/apache2/msc_util.c
|
|
--- modsecurity-apache_2.6.8/apache2/msc_util.c 2012-09-25 14:05:00.000000000 +0100
|
|
+++ modsecurity-apache_2.6.8-patched/apache2/msc_util.c 2014-04-18 16:11:02.765000000 +0100
|
|
@@ -368,6 +368,24 @@
|
|
return d;
|
|
}
|
|
|
|
+char *m_strcasestr(const char *haystack, const char *needle) {
|
|
+ char aux, lower_aux;
|
|
+ int length;
|
|
+
|
|
+ if ((aux = *needle++) != 0) {
|
|
+ aux = (char)tolower((unsigned char)aux);
|
|
+ length = strlen(needle);
|
|
+ do {
|
|
+ do {
|
|
+ if ((lower_aux = *haystack++) == 0)
|
|
+ return NULL;
|
|
+ } while ((char)tolower((unsigned char)lower_aux) != aux);
|
|
+ } while (strncasecmp(haystack, needle, length) != 0);
|
|
+ haystack--;
|
|
+ }
|
|
+ return ((char *)haystack);
|
|
+}
|
|
+
|
|
/**
|
|
*
|
|
*/
|
|
diff -ru modsecurity-apache_2.6.8/apache2/msc_util.h modsecurity-apache_2.6.8-patched/apache2/msc_util.h
|
|
--- modsecurity-apache_2.6.8/apache2/msc_util.h 2012-09-25 14:05:00.000000000 +0100
|
|
+++ modsecurity-apache_2.6.8-patched/apache2/msc_util.h 2014-04-18 16:09:40.007000000 +0100
|
|
@@ -111,4 +111,6 @@
|
|
|
|
char DSOLOCAL *format_all_performance_variables(modsec_rec *msr, apr_pool_t *mp);
|
|
|
|
+char DSOLOCAL *m_strcasestr(const char *haystack, const char *needle);
|
|
+
|
|
#endif
|