summaryrefslogtreecommitdiff
path: root/ext/phar
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2014-02-24 12:07:09 +0800
committerXinchen Hui <laruence@gmail.com>2014-02-24 12:07:09 +0800
commit077b02326a22d14f4970ffc3770e2a85f0728fb0 (patch)
treef887835f5fb83717b2f6f859f3ac8f4fcc3de6ad /ext/phar
parented8691b24be8673c2ab316991bfea885b1717f79 (diff)
downloadphp-git-077b02326a22d14f4970ffc3770e2a85f0728fb0.tar.gz
Refactor php_addslashes using zend_string
Diffstat (limited to 'ext/phar')
-rw-r--r--ext/phar/func_interceptors.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/ext/phar/func_interceptors.c b/ext/phar/func_interceptors.c
index c0b03e5838..5080ddf7c8 100644
--- a/ext/phar/func_interceptors.c
+++ b/ext/phar/func_interceptors.c
@@ -203,14 +203,8 @@ phar_it:
/* uses mmap if possible */
if ((len = php_stream_copy_to_mem(stream, &contents, maxlen, 0)) > 0) {
-#if PHP_API_VERSION < 20100412
- if (PG(magic_quotes_runtime)) {
- int newlen;
- contents = php_addslashes(contents, len, &newlen, 1 TSRMLS_CC); /* 1 = free source string */
- len = newlen;
- }
-#endif
RETVAL_STRINGL(contents, len, 0);
+ efree(contents);
} else if (len == 0) {
RETVAL_EMPTY_STRING();
} else {