diff options
author | Vincent Petry <vincent@nextcloud.com> | 2021-11-19 17:24:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-19 17:24:50 +0100 |
commit | 1efdd6ccae289d0ef3995cfbb95272f5015dcc9a (patch) | |
tree | dd6be2e86e9b6245da93a432ea7e51f6e45c86b0 /lib/private/legacy | |
parent | 289624b79ec77370989f3041a708f13043a54920 (diff) | |
parent | 3ac316b77fedfbd7edce99de0dd0c974ad6aacb4 (diff) | |
download | nextcloud-server-1efdd6ccae289d0ef3995cfbb95272f5015dcc9a.tar.gz nextcloud-server-1efdd6ccae289d0ef3995cfbb95272f5015dcc9a.zip |
Merge pull request #29632 from nextcloud/fix/26118/imagecreatetruecolor-error
fix imagecreatetruecolor() error
Diffstat (limited to 'lib/private/legacy')
-rw-r--r-- | lib/private/legacy/OC_Image.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/legacy/OC_Image.php b/lib/private/legacy/OC_Image.php index c30ceae9916..b9ef31ed9fa 100644 --- a/lib/private/legacy/OC_Image.php +++ b/lib/private/legacy/OC_Image.php @@ -924,6 +924,10 @@ class OC_Image implements \OCP\IImage { * @return resource|bool|\GdImage */ public function preciseResizeNew(int $width, int $height) { + if (!($width > 0) || !($height > 0)) { + $this->logger->info(__METHOD__ . '(): Requested image size not bigger than 0', ['app' => 'core']); + return false; + } if (!$this->valid()) { $this->logger->error(__METHOD__ . '(): No image loaded', ['app' => 'core']); return false; |