From 433089ccb4d4747a01d522e8678664ff17584615 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Thu, 2 Aug 2012 12:30:07 +0800 Subject: [PATCH] Fixed bug #62716 (munmap() is called with the incorrect length) --- NEWS | 2 ++ Zend/zend_stream.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index b836d4f680..97fc6d626d 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,8 @@ PHP NEWS ?? ??? 2012, PHP 5.3.16 - Core: + . Fixed bug #62716 (munmap() is called with the incorrect length). + (slangley@google.com) . Fixed bug #60194 (--with-zend-multibyte and --enable-debug reports LEAK with run-test.php). (Laruence) diff --git a/Zend/zend_stream.c b/Zend/zend_stream.c index 5a02ecdfae..bc5206c12c 100644 --- a/Zend/zend_stream.c +++ b/Zend/zend_stream.c @@ -79,7 +79,7 @@ static size_t zend_stream_stdio_fsizer(void *handle TSRMLS_DC) /* {{{ */ static void zend_stream_unmap(zend_stream *stream TSRMLS_DC) { /* {{{ */ #if HAVE_MMAP if (stream->mmap.map) { - munmap(stream->mmap.map, stream->mmap.len); + munmap(stream->mmap.map, stream->mmap.len + ZEND_MMAP_AHEAD); } else #endif if (stream->mmap.buf) { -- 2.40.0