summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ifilter.c6
-rw-r--r--post_handler.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/ifilter.c b/ifilter.c
index efd2a6b..19f1457 100644
--- a/ifilter.c
+++ b/ifilter.c
@@ -146,7 +146,7 @@ static void suhosin_server_strip(HashTable *arr, char *key, int klen)
146 if (zend_hash_find(arr, key, klen, (void **) &tzval) == SUCCESS && 146 if (zend_hash_find(arr, key, klen, (void **) &tzval) == SUCCESS &&
147 Z_TYPE_PP(tzval) == IS_STRING) { 147 Z_TYPE_PP(tzval) == IS_STRING) {
148 148
149 s = t = Z_STRVAL_PP(tzval); 149 s = t = (unsigned char *)Z_STRVAL_PP(tzval);
150 for (; *t; t++) { 150 for (; *t; t++) {
151 if (suhosin_is_dangerous_char[*t]) { 151 if (suhosin_is_dangerous_char[*t]) {
152 *t = '?'; 152 *t = '?';
@@ -168,7 +168,7 @@ static void suhosin_server_encode(HashTable *arr, char *key, int klen)
168 if (zend_hash_find(arr, key, klen, (void **) &tzval) == SUCCESS && 168 if (zend_hash_find(arr, key, klen, (void **) &tzval) == SUCCESS &&
169 Z_TYPE_PP(tzval) == IS_STRING) { 169 Z_TYPE_PP(tzval) == IS_STRING) {
170 170
171 temp = Z_STRVAL_PP(tzval); 171 temp = (unsigned char *)Z_STRVAL_PP(tzval);
172 172
173 t = temp; 173 t = temp;
174 for (t = temp; *t; t++) { 174 for (t = temp; *t; t++) {
@@ -195,7 +195,7 @@ static void suhosin_server_encode(HashTable *arr, char *key, int klen)
195 } 195 }
196 *n = 0; 196 *n = 0;
197 197
198 Z_STRVAL_PP(tzval) = newv; 198 Z_STRVAL_PP(tzval) = (char *)newv;
199 Z_STRLEN_PP(tzval) = n-newv; 199 Z_STRLEN_PP(tzval) = n-newv;
200 } 200 }
201} 201}
diff --git a/post_handler.c b/post_handler.c
index 96f4b4a..a36efb4 100644
--- a/post_handler.c
+++ b/post_handler.c
@@ -148,10 +148,10 @@ void suhosin_hook_post_handlers(TSRMLS_D)
148 148
149 /* we need to tell suhosin patch that there is a new valid destructor */ 149 /* we need to tell suhosin patch that there is a new valid destructor */
150 /* therefore we have create HashTable that has this destructor */ 150 /* therefore we have create HashTable that has this destructor */
151 zend_hash_init(&tempht, 0, NULL, suhosin_post_handler_modification, 0); 151 zend_hash_init(&tempht, 0, NULL, (dtor_func_t)suhosin_post_handler_modification, 0);
152 zend_hash_destroy(&tempht); 152 zend_hash_destroy(&tempht);
153 /* And now we can overwrite the destructor for post entries */ 153 /* And now we can overwrite the destructor for post entries */
154 SG(known_post_content_types).pDestructor = suhosin_post_handler_modification; 154 SG(known_post_content_types).pDestructor = (dtor_func_t)suhosin_post_handler_modification;
155 155
156 /* we have to stop mbstring from replacing our post handler */ 156 /* we have to stop mbstring from replacing our post handler */
157 if (zend_hash_find(EG(ini_directives), "mbstring.encoding_translation", sizeof("mbstring.encoding_translation"), (void **) &ini_entry) == FAILURE) { 157 if (zend_hash_find(EG(ini_directives), "mbstring.encoding_translation", sizeof("mbstring.encoding_translation"), (void **) &ini_entry) == FAILURE) {