Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-02-10 15:44:16 +0300
committerJoas Schilling <coding@schilljs.com>2017-02-10 15:45:37 +0300
commit057f3308794b39378dbcfcac4386cacff25b0362 (patch)
treee18de7d4317c8d3e7ea2be0166cbcaac8b79157b
parent5c1bf139b4975af3f78fccd018828f3c0e793c7d (diff)
Make sure invalid images don't flood the log file
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--lib/private/legacy/image.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/legacy/image.php b/lib/private/legacy/image.php
index 5403cccd026..7f4295e3e93 100644
--- a/lib/private/legacy/image.php
+++ b/lib/private/legacy/image.php
@@ -747,7 +747,7 @@ class OC_Image implements \OCP\IImage {
$this->logger->warning($error, array('app' => 'core'));
return $im;
}
- $color = unpack('V', $part . $vide);
+ $color = @unpack('V', $part . $vide);
break;
case 16:
if (!($part = substr($data, $p, 2))) {
@@ -755,20 +755,20 @@ class OC_Image implements \OCP\IImage {
$this->logger->warning($error, array('app' => 'core'));
return $im;
}
- $color = unpack('v', $part);
+ $color = @unpack('v', $part);
$color[1] = (($color[1] & 0xf800) >> 8) * 65536 + (($color[1] & 0x07e0) >> 3) * 256 + (($color[1] & 0x001f) << 3);
break;
case 8:
- $color = unpack('n', $vide . substr($data, $p, 1));
+ $color = @unpack('n', $vide . substr($data, $p, 1));
$color[1] = $palette[$color[1] + 1];
break;
case 4:
- $color = unpack('n', $vide . substr($data, floor($p), 1));
+ $color = @unpack('n', $vide . substr($data, floor($p), 1));
$color[1] = ($p * 2) % 2 == 0 ? $color[1] >> 4 : $color[1] & 0x0F;
$color[1] = $palette[$color[1] + 1];
break;
case 1:
- $color = unpack('n', $vide . substr($data, floor($p), 1));
+ $color = @unpack('n', $vide . substr($data, floor($p), 1));
switch (($p * 8) % 8) {
case 0:
$color[1] = $color[1] >> 7;