summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdin Kadribasic <edink@php.net>2006-06-05 22:19:36 +0000
committerEdin Kadribasic <edink@php.net>2006-06-05 22:19:36 +0000
commit8b764bd08c00e749203266edbe396c39b7e22ac2 (patch)
treed60fef1321a92c914748e1b06594159ed6cdf0ca
parent1b602e85d114ed17f33bdef37927e9afb39737c1 (diff)
downloadphp-git-8b764bd08c00e749203266edbe396c39b7e22ac2.tar.gz
Fixed bug #35886 (nlopes)
-rw-r--r--NEWS2
-rw-r--r--main/streams/plain_wrapper.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 94feb72ce0..c14354af07 100644
--- a/NEWS
+++ b/NEWS
@@ -110,6 +110,8 @@ PHP NEWS
RFC3548 compliance). (Ilia)
- Fixed bug #36949 (invalid internal mysqli objects dtor). (Mike)
- Fixed bug #36630 (umask not reset at the end of the request). (Ilia)
+- Fixed bug #35886 (file_get_contents() fails with some
+ combinations of offset & maxlen). (Nuno)
- Fixed bug #35512 (Lack of read permission on main script results in
E_WARNING rather then E_ERROR). (Ilia)
- Fixed bug #34180 (--with-curlwrappers causes PHP to disregard some HTTP
diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c
index 2180318fcf..49c11d2c1c 100644
--- a/main/streams/plain_wrapper.c
+++ b/main/streams/plain_wrapper.c
@@ -706,7 +706,7 @@ static int php_stdiop_set_option(php_stream *stream, int option, int value, void
delta = range->offset - loffs;
}
- data->last_mapped_addr = MapViewOfFile(data->file_mapping, acc, 0, loffs, range->length);
+ data->last_mapped_addr = MapViewOfFile(data->file_mapping, acc, 0, loffs, range->length + delta);
if (data->last_mapped_addr) {
/* give them back the address of the start offset they requested */