andrei Sat Nov 12 06:12:01 2005 EDT
Modified files:
/php-src/main rfc1867.c
Log:
Grr. Re-re-fix the fix.
http://cvs.php.net/diff.php/php-src/main/rfc1867.c?r1=1.178&r2=1.179&ty=u
Index: php-src/main/rfc1867.c
diff -u php-src/main/rfc1867.c:1.178 php-src/main/rfc1867.c:1.179
--- php-src/main/rfc1867.c:1.178 Fri Nov 11 12:34:16 2005
+++ php-src/main/rfc1867.c Sat Nov 12 06:11:53 2005
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: rfc1867.c,v 1.178 2005/11/11 17:34:16 andrei Exp $ */
+/* $Id: rfc1867.c,v 1.179 2005/11/12 11:11:53 andrei Exp $ */
/*
* This product includes software developed by the Apache Group
@@ -35,11 +35,6 @@
#define DEBUG_FILE_UPLOAD ZEND_DEBUG
-#if HAVE_MBSTRING && !defined(COMPILE_DL_MBSTRING)
-#include "ext/mbstring/mbstring.h"
-
-static void safe_php_register_variable(char *var, char *strval, zval
*track_vars_array, zend_bool override_protection TSRMLS_DC);
-
#define SAFE_RETURN { \
if (lbuf) efree(lbuf); \
if (abuf) efree(abuf); \
@@ -52,6 +47,11 @@
if (mbuff) efree(mbuff); \
return; }
+#if HAVE_MBSTRING && !defined(COMPILE_DL_MBSTRING)
+#include "ext/mbstring/mbstring.h"
+
+static void safe_php_register_variable(char *var, char *strval, zval
*track_vars_array, zend_bool override_protection TSRMLS_DC);
+
void php_mb_flush_gpc_variables(int num_vars, char **val_list, int *len_list,
zval *array_ptr TSRMLS_DC)
{
int i;
@@ -102,19 +102,6 @@
(*num_vars)++;
}
-#else
-
-#define SAFE_RETURN { \
- if (lbuf) efree(lbuf); \
- if (abuf) efree(abuf); \
- if (array_index) efree(array_index); \
- zend_hash_destroy(&PG(rfc1867_protected_variables)); \
- zend_llist_destroy(&header); \
- if (mbuff->boundary_next) efree(mbuff->boundary_next); \
- if (mbuff->boundary) efree(mbuff->boundary); \
- if (mbuff->buffer) efree(mbuff->buffer); \
- if (mbuff) efree(mbuff); \
- return; }
#endif
/* The longest property name we use in an uploaded file array */
@@ -1596,7 +1583,9 @@
zend_llist_clean(&header);
if (!multipart_buffer_headers(mbuff, &header TSRMLS_CC)) {
+#if HAVE_MBSTRING && !defined(COMPILE_DL_MBSTRING)
php_mb_flush_gpc_variables(num_vars, val_list,
len_list, array_ptr TSRMLS_CC);
+#endif
SAFE_RETURN;
}
@@ -1676,7 +1665,9 @@
/* Return with an error if the posted data is garbled */
if (!param && !filename) {
sapi_module.sapi_error(E_WARNING, "File Upload
Mime headers garbled");
+#if HAVE_MBSTRING && !defined(COMPILE_DL_MBSTRING)
php_mb_flush_gpc_variables(num_vars, val_list,
len_list, array_ptr TSRMLS_CC);
+#endif
SAFE_RETURN;
}
@@ -1983,7 +1974,9 @@
}
}
+#if HAVE_MBSTRING && !defined(COMPILE_DL_MBSTRING)
php_mb_flush_gpc_variables(num_vars, val_list, len_list, array_ptr
TSRMLS_CC);
+#endif
SAFE_RETURN;
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php