main/streams/plain_wrapper.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c
index f52383d..72be0b0 100644
--- a/main/streams/plain_wrapper.c
+++ b/main/streams/plain_wrapper.c
@@ -669,7 +669,8 @@ static int php_stdiop_set_option(php_stream *stream, int option, int value, void
return fd == -1 ? PHP_STREAM_OPTION_RETURN_ERR : PHP_STREAM_OPTION_RETURN_OK;
case PHP_STREAM_MMAP_MAP_RANGE:
-
do_fstat(data, 1);
-
if(do_fstat(data, 1)<0)
-
return -1; if (range->length == 0 && range->offset > 0 && range->offset < data->sb.st_size) { range->length = data->sb.st_size - range->offset; }
--
1.9.1
Hey:
main/streams/plain_wrapper.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c
index f52383d..72be0b0 100644
--- a/main/streams/plain_wrapper.c
+++ b/main/streams/plain_wrapper.c
@@ -669,7 +669,8 @@ static int php_stdiop_set_option(php_stream *stream, int option, int value, void
return fd == -1 ? PHP_STREAM_OPTION_RETURN_ERR : PHP_STREAM_OPTION_RETURN_OK;case PHP_STREAM_MMAP_MAP_RANGE:
do_fstat(data, 1);
if(do_fstat(data, 1)<0)
return -1; if (range->length == 0 && range->offset > 0 && range->offset < data->sb.st_size) { range->length = data->sb.st_size - range->offset; }
--
1.9.1
do you have a test script to show how to reproduce the error?
thanks
--
--
Xinchen Hui
@Laruence
http://www.laruence.com/
Hi,
do you have a test script to show how to reproduce the error?
thanks
No, I don't.
But, if you run `grep -nr do_fstat main/streams/plain_wrapper.c -C3',
you can see the result is compared against '0' everywhere else it is used.
Thanks,
-- Joshua Rogers <https://internot.info/