From: Edin Kadribasic Date: Mon, 5 Jun 2006 22:19:36 +0000 (+0000) Subject: Fixed bug #35886 (nlopes) X-Git-Tag: php-5.2.0RC1~367 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8b764bd08c00e749203266edbe396c39b7e22ac2;p=php Fixed bug #35886 (nlopes) --- 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 */