diff options
-rw-r--r-- | ext/opcache/zend_shared_alloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/opcache/zend_shared_alloc.c b/ext/opcache/zend_shared_alloc.c index ade01af4f5..1ab7f774ed 100644 --- a/ext/opcache/zend_shared_alloc.c +++ b/ext/opcache/zend_shared_alloc.c @@ -626,7 +626,7 @@ void zend_accel_shared_protect(int mode) for (i = 0; i < ZSMMG(shared_segments_count); i++) { DWORD oldProtect; - if (!VirtualProtect(ZSMMG(shared_segments)[i]->p, ZSMMG(shared_segments)[i]->size, mode, &oldProtect)) { + if (!VirtualProtect(ZSMMG(shared_segments)[i]->p, ZSMMG(shared_segments)[i]->end, mode, &oldProtect)) { zend_accel_error(ACCEL_LOG_ERROR, "Failed to protect memory"); } } |