From 628dbc9293182bebe48792380cadce0a108219d8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Thu, 6 Sep 2018 07:29:16 +0000 Subject: [PATCH 1/2] Bump lukasreschke/id3parser from 0.0.1 to 0.0.3 Bumps [lukasreschke/id3parser](https://github.com/LukasReschke/ID3Parser) from 0.0.1 to 0.0.3. - [Release notes](https://github.com/LukasReschke/ID3Parser/releases) - [Commits](https://github.com/LukasReschke/ID3Parser/compare/v0.0.1...v0.0.3) Signed-off-by: dependabot[bot] --- composer.json | 2 +- composer.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index 0dc792497..54a515040 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ "jeremeamia/superclosure": "2.1.0", "leafo/scssphp": "0.7.7", "league/flysystem": "^1.0", - "lukasreschke/id3parser": "^0.0.1", + "lukasreschke/id3parser": "^0.0.3", "nikic/php-parser": "1.4.1", "patchwork/jsqueeze": "^2.0", "patchwork/utf8": "1.3.1", diff --git a/composer.lock b/composer.lock index d1e8383bb..e827668fb 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ea0e1173afefe5b185d6b46586da84c2", + "content-hash": "3ffb917bd2bbcd49da8c68085b51834b", "packages": [ { "name": "aws/aws-sdk-php", @@ -1440,16 +1440,16 @@ }, { "name": "lukasreschke/id3parser", - "version": "v0.0.1", + "version": "v0.0.3", "source": { "type": "git", "url": "https://github.com/LukasReschke/ID3Parser.git", - "reference": "cd3ba6e8918cc30883f01a3c24281cfe23b8877a" + "reference": "62f4de76d4eaa9ea13c66dacc1f22977dace6638" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/LukasReschke/ID3Parser/zipball/cd3ba6e8918cc30883f01a3c24281cfe23b8877a", - "reference": "cd3ba6e8918cc30883f01a3c24281cfe23b8877a", + "url": "https://api.github.com/repos/LukasReschke/ID3Parser/zipball/62f4de76d4eaa9ea13c66dacc1f22977dace6638", + "reference": "62f4de76d4eaa9ea13c66dacc1f22977dace6638", "shasum": "" }, "require": { @@ -1471,7 +1471,7 @@ "php", "tags" ], - "time": "2016-04-04T09:34:50+00:00" + "time": "2016-09-22T15:10:54+00:00" }, { "name": "microsoft/azure-storage-blob", From 74a2a6cb97ceaa3e787c114e0545fe0499821354 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Thu, 6 Sep 2018 22:53:46 +0200 Subject: [PATCH 2/2] Vendor id3parser Signed-off-by: Roeland Jago Douma --- composer/installed.json | 12 ++++++------ lukasreschke/id3parser/src/getID3/getid3_handler.php | 12 +++++++++++- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/composer/installed.json b/composer/installed.json index 477761cca..b947f7da1 100644 --- a/composer/installed.json +++ b/composer/installed.json @@ -1481,23 +1481,23 @@ }, { "name": "lukasreschke/id3parser", - "version": "v0.0.1", - "version_normalized": "0.0.1.0", + "version": "v0.0.3", + "version_normalized": "0.0.3.0", "source": { "type": "git", "url": "https://github.com/LukasReschke/ID3Parser.git", - "reference": "cd3ba6e8918cc30883f01a3c24281cfe23b8877a" + "reference": "62f4de76d4eaa9ea13c66dacc1f22977dace6638" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/LukasReschke/ID3Parser/zipball/cd3ba6e8918cc30883f01a3c24281cfe23b8877a", - "reference": "cd3ba6e8918cc30883f01a3c24281cfe23b8877a", + "url": "https://api.github.com/repos/LukasReschke/ID3Parser/zipball/62f4de76d4eaa9ea13c66dacc1f22977dace6638", + "reference": "62f4de76d4eaa9ea13c66dacc1f22977dace6638", "shasum": "" }, "require": { "php": ">=5.4.0" }, - "time": "2016-04-04T09:34:50+00:00", + "time": "2016-09-22T15:10:54+00:00", "type": "library", "installation-source": "dist", "autoload": { diff --git a/lukasreschke/id3parser/src/getID3/getid3_handler.php b/lukasreschke/id3parser/src/getID3/getid3_handler.php index 654593349..f1f43f6ba 100644 --- a/lukasreschke/id3parser/src/getID3/getid3_handler.php +++ b/lukasreschke/id3parser/src/getID3/getid3_handler.php @@ -84,7 +84,17 @@ protected function fread($bytes) { if (!getid3_lib::intValueSupported($pos)) { throw new getid3_exception('cannot fread('.$bytes.' from '.$this->ftell().') because beyond PHP filesystem limit', 10); } - return fread($this->getid3->fp, $bytes); + + // System fread function may return less data than requested in case the file is not a regular local file. + // See http://php.net/manual/en/function.fread.php. Call it repeatedly in a loop if that is the case. + $contents = ''; + do { + $part = fread($this->getid3->fp, $bytes); + $partLength = strlen($part); + $bytes -= $partLength; + $contents .= $part; + } while ($bytes > 0 && $partLength > 0); + return $contents; } protected function fseek($bytes, $whence=SEEK_SET) {