]> granicus.if.org Git - php/commitdiff
Fixed bug #35886 (nlopes)
authorEdin Kadribasic <edink@php.net>
Mon, 5 Jun 2006 22:19:36 +0000 (22:19 +0000)
committerEdin Kadribasic <edink@php.net>
Mon, 5 Jun 2006 22:19:36 +0000 (22:19 +0000)
NEWS
main/streams/plain_wrapper.c

diff --git a/NEWS b/NEWS
index 94feb72ce022d039922f7298fefbddcaf364191b..c14354af07e9a51603a14a299f92754fb6612964 100644 (file)
--- 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 
index 2180318fcfbe8c3e314e2257d6f0fa8ec31d8402..49c11d2c1c45b6d1cd9b17f0d528b9481cd0921e 100644 (file)
@@ -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 */