Patch wrong_arkey_alloc_fix for APC Bug #61219
Patch version 2012-03-08 20:23 UTC
Return to Bug #61219 |
Download this patch
Patch Revisions:
Developer: ab@php.net
Index: apc_compile.c
===================================================================
--- apc_compile.c (revision 324014)
+++ apc_compile.c (working copy)
@@ -899,8 +899,8 @@
newp->arKey = arKey;
}
} else {
- CHECK((newp = (Bucket*) apc_pmemcpy(curr, (sizeof(Bucket) + curr->nKeyLength), pool TSRMLS_CC)));
- newp->arKey = ((char*)newp) + sizeof(Bucket);
+ CHECK((newp = (Bucket*) apc_pmemcpy(curr, sizeof(Bucket), pool TSRMLS_CC)));
+ CHECK((newp->arKey = (char*) apc_pmemcpy(curr->arKey, curr->nKeyLength, pool TSRMLS_CC)));
}
#else
CHECK((newp = (Bucket*) apc_pmemcpy(curr,
|