cvs: php-src(PHP_4_3) /main php_variables.c
| From: | Ilia Alshanetsky | Date: | Tue, 17 May 2005 18:42:36 +0000 |
| Subject: | cvs: php-src(PHP_4_3) /main php_variables.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-31890@lists.php.net to get a copy of this message | ||
iliaa Tue May 17 14:42:36 2005 EDT
Modified files: (Branch: PHP_4_3)
/php-src/main php_variables.c
Log:
Fixed bug #32802 (broken MFH)
http://cvs.php.net/diff.php/php-src/main/php_variables.c?r1=1.45.2.12&r2=1.45.2.13&ty=u
Index: php-src/main/php_variables.c
diff -u php-src/main/php_variables.c:1.45.2.12 php-src/main/php_variables.c:1.45.2.13
--- php-src/main/php_variables.c:1.45.2.12 Fri May 13 01:27:14 2005
+++ php-src/main/php_variables.c Tue May 17 14:42:35 2005
@@ -16,7 +16,7 @@
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_variables.c,v 1.45.2.12 2005/05/13 05:27:14 rasmus Exp $ */
+/* $Id: php_variables.c,v 1.45.2.13 2005/05/17 18:42:35 iliaa Exp $ */
#include <stdio.h>
#include "php.h"
@@ -182,11 +182,25 @@
if (!index) {
zend_hash_next_index_insert(symtable1, &gpc_element, sizeof(zval *), (void **)
&gpc_element_p);
} else {
+ zval **tmp;
+
if (PG(magic_quotes_gpc) && (index!=var)) {
char *escaped_index = php_addslashes(index, index_len, &index_len, 0 TSRMLS_CC);
+
+ if (PG(http_globals)[TRACK_VARS_COOKIE] && symtable1 ==
Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_COOKIE]) &&
+ zend_hash_find(symtable1, escaped_index, index_len+1, (void **) &tmp) != FAILURE) {
+ efree(escaped_index);
+ break;
+ }
+
zend_hash_update(symtable1, escaped_index, index_len+1, &gpc_element, sizeof(zval *),
(void **) &gpc_element_p);
efree(escaped_index);
} else {
+ if (PG(http_globals)[TRACK_VARS_COOKIE] && symtable1 ==
Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_COOKIE]) &&
+ zend_hash_find(symtable1, index, index_len+1, (void **) &tmp) != FAILURE) {
+ break;
+ }
+
zend_hash_update(symtable1, index, index_len+1, &gpc_element, sizeof(zval *), (void **)
&gpc_element_p);
}
}