CVE-2015-1351
Community BUG:
Community CODE:
This patch was created from the community reports above.
--- zendopcache-7.0.2/zend_shared_alloc.c_orig 2015-06-10 13:25:02.003036264 -0700
+++ zendopcache-7.0.2/zend_shared_alloc.c 2015-06-10 13:25:50.714271495 -0700
@@ -346,10 +346,10 @@
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;
}