summaryrefslogtreecommitdiff
path: root/ext/opcache/zend_shared_alloc.c
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2015-01-08 16:32:20 +0800
committerLior Kaplan <kaplanlior@gmail.com>2015-04-01 01:24:16 +0300
commit0a8f28b43212cc2ddbc1f2df710e37b1bec0addd (patch)
treeccbe4893f677dd4800b91f0d0e4f29999819965b /ext/opcache/zend_shared_alloc.c
parentffbd380e4483a5b36733cfd99fab779008082d11 (diff)
downloadphp-git-0a8f28b43212cc2ddbc1f2df710e37b1bec0addd.tar.gz
Fixed bug #68677 (Use After Free in OPcache)
(cherry picked from commit 777c39f4042327eac4b63c7ee87dc1c7a09a3115)
Diffstat (limited to 'ext/opcache/zend_shared_alloc.c')
-rw-r--r--ext/opcache/zend_shared_alloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/opcache/zend_shared_alloc.c b/ext/opcache/zend_shared_alloc.c
index bbe26e8172..8880b8817f 100644
--- a/ext/opcache/zend_shared_alloc.c
+++ b/ext/opcache/zend_shared_alloc.c
@@ -346,10 +346,10 @@ void *_zend_shared_memdup(void *source, size_t size, zend_bool free_source TSRML
retval = ZCG(mem);;
ZCG(mem) = (void*)(((char*)ZCG(mem)) + ZEND_ALIGNED_SIZE(size));
memcpy(retval, source, size);
+ zend_shared_alloc_register_xlat_entry(source, retval);
if (free_source) {
interned_efree((char*)source);
}
- zend_shared_alloc_register_xlat_entry(source, retval);
return retval;
}