mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
We fix the erroneous length calculation on Windows, too. Closes GH-6067.
This commit is contained in:
parent
c70a938f28
commit
1848ccdae2
2 changed files with 7 additions and 8 deletions
3
NEWS
3
NEWS
|
@ -2,6 +2,9 @@ PHP NEWS
|
||||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||
?? ??? ????, PHP 7.3.23
|
?? ??? ????, PHP 7.3.23
|
||||||
|
|
||||||
|
- Core:
|
||||||
|
. Fixed bug #80048 (Bug #69100 has not been fixed for Windows). (cmb)
|
||||||
|
|
||||||
- Calendar:
|
- Calendar:
|
||||||
. Fixed bug #80007 (Potential type confusion in unixtojd() parameter parsing).
|
. Fixed bug #80007 (Potential type confusion in unixtojd() parameter parsing).
|
||||||
(Andy Postnikov)
|
(Andy Postnikov)
|
||||||
|
|
|
@ -786,15 +786,11 @@ static int php_stdiop_set_option(php_stream *stream, int option, int value, void
|
||||||
}
|
}
|
||||||
|
|
||||||
size = GetFileSize(hfile, NULL);
|
size = GetFileSize(hfile, NULL);
|
||||||
if (range->length == 0 && range->offset > 0 && range->offset < size) {
|
if (range->offset > size) {
|
||||||
range->length = size - range->offset;
|
|
||||||
}
|
|
||||||
if (range->length == 0 || range->length > size) {
|
|
||||||
range->length = size;
|
|
||||||
}
|
|
||||||
if (range->offset >= size) {
|
|
||||||
range->offset = size;
|
range->offset = size;
|
||||||
range->length = 0;
|
}
|
||||||
|
if (range->length == 0 || range->length > size - range->offset) {
|
||||||
|
range->length = size - range->offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* figure out how big a chunk to map to be able to view the part that we need */
|
/* figure out how big a chunk to map to be able to view the part that we need */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue