diff options
author | Julius Härtl <jus@bitgrid.net> | 2021-02-26 11:12:20 +0100 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2021-03-30 19:22:47 +0000 |
commit | fc2e09b66743a12ed2c1a885a21640d7274d6e99 (patch) | |
tree | 7fad2675dee1a4cd1cf35cdcddc74fdad4feca9d /lib/private/Files/View.php | |
parent | b2072cd6fca3302cd621ef849b8e5e59b42665a8 (diff) | |
download | nextcloud-server-fc2e09b66743a12ed2c1a885a21640d7274d6e99.tar.gz nextcloud-server-fc2e09b66743a12ed2c1a885a21640d7274d6e99.zip |
Properly end iterating over the file once the target has been reached
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/private/Files/View.php')
-rw-r--r-- | lib/private/Files/View.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index 1bee09e3659..ed7d6c26318 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -456,7 +456,7 @@ class View { // forward file handle via chunked fread because fseek seem to have failed $end = $from + 1; - while (!feof($handle) && ftell($handle) < $end) { + while (!feof($handle) && ftell($handle) < $end && ftell($handle) !== $from) { $len = $from - ftell($handle); if ($len > $chunkSize) { $len = $chunkSize; |