Skip to content

Commit 433089c

Browse files
committed
Fixed bug #62716 (munmap() is called with the incorrect length)
1 parent 10642aa commit 433089c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ PHP NEWS
33
?? ??? 2012, PHP 5.3.16
44

55
- Core:
6+
. Fixed bug #62716 (munmap() is called with the incorrect length).
7+
(slangley@google.com)
68
. Fixed bug #60194 (--with-zend-multibyte and --enable-debug reports LEAK
79
with run-test.php). (Laruence)
810

Zend/zend_stream.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ static size_t zend_stream_stdio_fsizer(void *handle TSRMLS_DC) /* {{{ */
7979
static void zend_stream_unmap(zend_stream *stream TSRMLS_DC) { /* {{{ */
8080
#if HAVE_MMAP
8181
if (stream->mmap.map) {
82-
munmap(stream->mmap.map, stream->mmap.len);
82+
munmap(stream->mmap.map, stream->mmap.len + ZEND_MMAP_AHEAD);
8383
} else
8484
#endif
8585
if (stream->mmap.buf) {

0 commit comments

Comments
 (0)