diff options
| author | Ben Fuhrmannek | 2014-11-22 16:13:15 +0100 |
|---|---|---|
| committer | Ben Fuhrmannek | 2014-11-22 16:13:15 +0100 |
| commit | a69c64b2bc5756b14605ad39ffad69d09c0d578c (patch) | |
| tree | 6bc2008c9e73e09e53c3ac5688ef9a9d032d93bb /ufilter.c | |
| parent | df62872ad72b13c24637f33d2452269a48c88f8d (diff) | |
TSRM related speed optimization - thanks to patch from NewEraCracker
Diffstat (limited to 'ufilter.c')
| -rw-r--r-- | ufilter.c | 6 |
1 files changed, 2 insertions, 4 deletions
| @@ -32,7 +32,6 @@ | |||
| 32 | #include "suhosin_rfc1867.h" | 32 | #include "suhosin_rfc1867.h" |
| 33 | #include "ext/standard/php_var.h" | 33 | #include "ext/standard/php_var.h" |
| 34 | 34 | ||
| 35 | PHP_SUHOSIN_API int (*old_rfc1867_callback)(unsigned int event, void *event_data, void **extra TSRMLS_DC) = NULL; | ||
| 36 | #if !HAVE_RFC1867_CALLBACK | 35 | #if !HAVE_RFC1867_CALLBACK |
| 37 | PHP_SUHOSIN_API int (*php_rfc1867_callback)(unsigned int event, void *event_data, void **extra TSRMLS_DC) = NULL; | 36 | PHP_SUHOSIN_API int (*php_rfc1867_callback)(unsigned int event, void *event_data, void **extra TSRMLS_DC) = NULL; |
| 38 | #endif | 37 | #endif |
| @@ -40,11 +39,10 @@ PHP_SUHOSIN_API int (*php_rfc1867_callback)(unsigned int event, void *event_data | |||
| 40 | 39 | ||
| 41 | /* {{{ SAPI_UPLOAD_VARNAME_FILTER_FUNC | 40 | /* {{{ SAPI_UPLOAD_VARNAME_FILTER_FUNC |
| 42 | */ | 41 | */ |
| 43 | static int check_fileupload_varname(char *varname) | 42 | static int check_fileupload_varname(char *varname TSRMLS_DC) |
| 44 | { | 43 | { |
| 45 | char *index, *prev_index = NULL, *var; | 44 | char *index, *prev_index = NULL, *var; |
| 46 | unsigned int var_len, total_len, depth = 0; | 45 | unsigned int var_len, total_len, depth = 0; |
| 47 | TSRMLS_FETCH(); | ||
| 48 | 46 | ||
| 49 | var = estrdup(varname); | 47 | var = estrdup(varname); |
| 50 | 48 | ||
| @@ -226,7 +224,7 @@ int suhosin_rfc1867_filter(unsigned int event, void *event_data, void **extra TS | |||
| 226 | } | 224 | } |
| 227 | 225 | ||
| 228 | 226 | ||
| 229 | if (check_fileupload_varname(mefs->name) == FAILURE) { | 227 | if (check_fileupload_varname(mefs->name TSRMLS_CC) == FAILURE) { |
| 230 | goto continue_with_failure; | 228 | goto continue_with_failure; |
| 231 | } | 229 | } |
| 232 | } | 230 | } |
