diff options
| -rw-r--r-- | ex_imp.c | 2 | ||||
| -rw-r--r-- | execute.c | 14 | ||||
| -rw-r--r-- | header.c | 4 | ||||
| -rw-r--r-- | log.c | 6 | ||||
| -rw-r--r-- | rfc1867_new.c | 2 | ||||
| -rw-r--r-- | session.c | 2 |
6 files changed, 15 insertions, 15 deletions
| @@ -463,7 +463,7 @@ static int copy_request_variable(void *pDest TSRMLS_DC, int num_args, va_list ar | |||
| 463 | } | 463 | } |
| 464 | 464 | ||
| 465 | if (hash_key->nKeyLength) { | 465 | if (hash_key->nKeyLength) { |
| 466 | php_prefix_varname(&new_key, prefix, hash_key->arKey, hash_key->nKeyLength - 1, 0 TSRMLS_CC); | 466 | php_prefix_varname(&new_key, prefix, (char *)hash_key->arKey, hash_key->nKeyLength - 1, 0 TSRMLS_CC); |
| 467 | } else { | 467 | } else { |
| 468 | zval num; | 468 | zval num; |
| 469 | 469 | ||
| @@ -316,7 +316,7 @@ static int suhosin_detect_codetype(zend_op_array *op_array TSRMLS_DC) | |||
| 316 | char *s; | 316 | char *s; |
| 317 | int r; | 317 | int r; |
| 318 | 318 | ||
| 319 | s = op_array->filename; | 319 | s = (char *)op_array->filename; |
| 320 | 320 | ||
| 321 | /* eval, assert, create_function, preg_replace */ | 321 | /* eval, assert, create_function, preg_replace */ |
| 322 | if (op_array->type == ZEND_EVAL_CODE) { | 322 | if (op_array->type == ZEND_EVAL_CODE) { |
| @@ -498,7 +498,7 @@ static void suhosin_execute_ex(zend_op_array *op_array, int zo, long dummy TSRML | |||
| 498 | suhosin_bailout(TSRMLS_C); | 498 | suhosin_bailout(TSRMLS_C); |
| 499 | } | 499 | } |
| 500 | 500 | ||
| 501 | fn = op_array->filename; | 501 | fn = (char *)op_array->filename; |
| 502 | len = strlen(fn); | 502 | len = strlen(fn); |
| 503 | 503 | ||
| 504 | orig_code_type = SUHOSIN_G(in_code_type); | 504 | orig_code_type = SUHOSIN_G(in_code_type); |
| @@ -683,11 +683,11 @@ int ih_preg_replace(IH_HANDLER_PARAMS) | |||
| 683 | zval **regex, | 683 | zval **regex, |
| 684 | **replace, | 684 | **replace, |
| 685 | **subject, | 685 | **subject, |
| 686 | **limit; | 686 | **limit, **zcount; |
| 687 | 687 | ||
| 688 | if (ZEND_NUM_ARGS() < 3 || zend_get_parameters_ex(3, ®ex, &replace, &subject, &limit) == FAILURE) { | 688 | if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ZZZ|ZZ", ®ex, &replace, &subject, &limit, &zcount) == FAILURE) { |
| 689 | return (0); | 689 | return(0); |
| 690 | } | 690 | } |
| 691 | 691 | ||
| 692 | if (Z_TYPE_PP(regex) == IS_ARRAY) { | 692 | if (Z_TYPE_PP(regex) == IS_ARRAY) { |
| 693 | zval **regex_entry; | 693 | zval **regex_entry; |
| @@ -1625,7 +1625,7 @@ static void suhosin_execute_internal(zend_execute_data *execute_data_ptr, int re | |||
| 1625 | #ifdef ZEND_ENGINE_2 | 1625 | #ifdef ZEND_ENGINE_2 |
| 1626 | ce = ((zend_internal_function *) execute_data_ptr->function_state.function)->scope; | 1626 | ce = ((zend_internal_function *) execute_data_ptr->function_state.function)->scope; |
| 1627 | #endif | 1627 | #endif |
| 1628 | lcname = ((zend_internal_function *) execute_data_ptr->function_state.function)->function_name; | 1628 | lcname = (char *)((zend_internal_function *) execute_data_ptr->function_state.function)->function_name; |
| 1629 | function_name_strlen = strlen(lcname); | 1629 | function_name_strlen = strlen(lcname); |
| 1630 | 1630 | ||
| 1631 | /* handle methodcalls correctly */ | 1631 | /* handle methodcalls correctly */ |
| @@ -211,7 +211,7 @@ int suhosin_header_handler(sapi_header_struct *sapi_header, sapi_headers_struct | |||
| 211 | 211 | ||
| 212 | for (i=0; i<sapi_header->header_len; i++, tmp++) { | 212 | for (i=0; i<sapi_header->header_len; i++, tmp++) { |
| 213 | if (tmp[0] == 0) { | 213 | if (tmp[0] == 0) { |
| 214 | char *fname = get_active_function_name(TSRMLS_C); | 214 | char *fname = (char *)get_active_function_name(TSRMLS_C); |
| 215 | 215 | ||
| 216 | if (!fname) { | 216 | if (!fname) { |
| 217 | fname = "unknown"; | 217 | fname = "unknown"; |
| @@ -226,7 +226,7 @@ int suhosin_header_handler(sapi_header_struct *sapi_header, sapi_headers_struct | |||
| 226 | continue; | 226 | continue; |
| 227 | } else if ((tmp[0] == '\r' && (tmp[1] != '\n' || i == 0)) || | 227 | } else if ((tmp[0] == '\r' && (tmp[1] != '\n' || i == 0)) || |
| 228 | (tmp[0] == '\n' && (i == sapi_header->header_len-1 || i == 0 || (tmp[1] != ' ' && tmp[1] != '\t')))) { | 228 | (tmp[0] == '\n' && (i == sapi_header->header_len-1 || i == 0 || (tmp[1] != ' ' && tmp[1] != '\t')))) { |
| 229 | char *fname = get_active_function_name(TSRMLS_C); | 229 | char *fname = (char *)get_active_function_name(TSRMLS_C); |
| 230 | 230 | ||
| 231 | if (!fname) { | 231 | if (!fname) { |
| 232 | fname = "unknown"; | 232 | fname = "unknown"; |
| @@ -162,14 +162,14 @@ PHP_SUHOSIN_API void suhosin_log(int loglevel, char *fmt, ...) | |||
| 162 | if (exdata) { | 162 | if (exdata) { |
| 163 | if (getcaller && exdata->prev_execute_data) { | 163 | if (getcaller && exdata->prev_execute_data) { |
| 164 | lineno = exdata->prev_execute_data->opline->lineno; | 164 | lineno = exdata->prev_execute_data->opline->lineno; |
| 165 | fname = exdata->prev_execute_data->op_array->filename; | 165 | fname = (char *)exdata->prev_execute_data->op_array->filename; |
| 166 | } else { | 166 | } else { |
| 167 | lineno = exdata->opline->lineno; | 167 | lineno = exdata->opline->lineno; |
| 168 | fname = exdata->op_array->filename; | 168 | fname = (char *)exdata->op_array->filename; |
| 169 | } | 169 | } |
| 170 | } else { | 170 | } else { |
| 171 | lineno = zend_get_executed_lineno(TSRMLS_C); | 171 | lineno = zend_get_executed_lineno(TSRMLS_C); |
| 172 | fname = zend_get_executed_filename(TSRMLS_C); | 172 | fname = (char *)zend_get_executed_filename(TSRMLS_C); |
| 173 | } | 173 | } |
| 174 | ap_php_snprintf(buf, sizeof(buf), "%s - %s (attacker '%s', file '%s', line %u)", alertstring, error, ip_address, fname, lineno); | 174 | ap_php_snprintf(buf, sizeof(buf), "%s - %s (attacker '%s', file '%s', line %u)", alertstring, error, ip_address, fname, lineno); |
| 175 | } else { | 175 | } else { |
diff --git a/rfc1867_new.c b/rfc1867_new.c index a069aa9..b6bbcdb 100644 --- a/rfc1867_new.c +++ b/rfc1867_new.c | |||
| @@ -403,7 +403,7 @@ static int multipart_buffer_headers(multipart_buffer *self, zend_llist *header T | |||
| 403 | char *value = NULL; | 403 | char *value = NULL; |
| 404 | 404 | ||
| 405 | if (php_rfc1867_encoding_translation(TSRMLS_C)) { | 405 | if (php_rfc1867_encoding_translation(TSRMLS_C)) { |
| 406 | self->input_encoding = zend_multibyte_encoding_detector(line, strlen(line), self->detect_order, self->detect_order_size TSRMLS_CC); | 406 | self->input_encoding = zend_multibyte_encoding_detector((const unsigned char *)line, strlen(line), self->detect_order, self->detect_order_size TSRMLS_CC); |
| 407 | } | 407 | } |
| 408 | 408 | ||
| 409 | /* space in the beginning means same header */ | 409 | /* space in the beginning means same header */ |
| @@ -1035,7 +1035,7 @@ void suhosin_hook_session(TSRMLS_D) | |||
| 1035 | 1035 | ||
| 1036 | /* Protect the PHP serializer from ! attacks */ | 1036 | /* Protect the PHP serializer from ! attacks */ |
| 1037 | # if PHP_MAJOR_VERSION > 5 || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 2) | 1037 | # if PHP_MAJOR_VERSION > 5 || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 2) |
| 1038 | serializer = SESSION_G(serializer); | 1038 | serializer = (ps_serializer *) SESSION_G(serializer); |
| 1039 | if (serializer != NULL && strcmp(serializer->name, "php")==0) { | 1039 | if (serializer != NULL && strcmp(serializer->name, "php")==0) { |
| 1040 | serializer->encode = suhosin_session_encode; | 1040 | serializer->encode = suhosin_session_encode; |
| 1041 | } | 1041 | } |
