summaryrefslogtreecommitdiff
path: root/main/php_variables.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2005-08-02 17:01:05 +0000
committerIlia Alshanetsky <iliaa@php.net>2005-08-02 17:01:05 +0000
commit990f7043d9ea32b3e7f3a28e3308f07fa2c7e459 (patch)
tree1b53b5b080f5d0a97060bcd7b6e58da438c1429c /main/php_variables.c
parent9f6e05964f815f74c6115ca6f27d61ee6787c7c5 (diff)
downloadphp-git-990f7043d9ea32b3e7f3a28e3308f07fa2c7e459.tar.gz
Fixed bug #33958 (duplicate cookies and magic_quotes=off may cause a crash)
Diffstat (limited to 'main/php_variables.c')
-rw-r--r--main/php_variables.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/main/php_variables.c b/main/php_variables.c
index 31f80674e1..3d686d0bc6 100644
--- a/main/php_variables.c
+++ b/main/php_variables.c
@@ -198,7 +198,9 @@ plain_var:
*/
if (PG(http_globals)[TRACK_VARS_COOKIE] && symtable1 == Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_COOKIE]) &&
zend_symtable_find(symtable1, escaped_index, index_len+1, (void **) &tmp) != FAILURE) {
- efree(escaped_index);
+ if (PG(magic_quotes_gpc)) {
+ efree(escaped_index);
+ }
break;
}
zend_symtable_update(symtable1, escaped_index, index_len + 1, &gpc_element, sizeof(zval *), (void **) &gpc_element_p);