From 63e49f20008b17e6da964966dd75e4cc98f12f6a Mon Sep 17 00:00:00 2001 From: provokateurin Date: Wed, 30 Sep 2026 18:46:21 +0200 Subject: [PATCH] fix(theming): Fix imagick segmentation fault when rendering an app icon Signed-off-by: provokateurin --- apps/theming/lib/IconBuilder.php | 2 +- apps/theming/tests/IconBuilderTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/theming/lib/IconBuilder.php b/apps/theming/lib/IconBuilder.php index 92018456a21a9..e5603e9033546 100644 --- a/apps/theming/lib/IconBuilder.php +++ b/apps/theming/lib/IconBuilder.php @@ -188,7 +188,7 @@ public function renderAppIcon($app, $size) { $finalIconFile->newImage($size, $size, new ImagickPixel('transparent')); $draw = new ImagickDraw(); $draw->setFillColor($color); - $draw->roundRectangle(0, 0, $size - 1, $size - 1, $cornerRadius, $cornerRadius); + $draw->roundRectangle(0, 0, $size, $size, $cornerRadius, $cornerRadius); $finalIconFile->drawImage($draw); $draw->destroy(); // overlay icon diff --git a/apps/theming/tests/IconBuilderTest.php b/apps/theming/tests/IconBuilderTest.php index 3ffaf7248e5a9..06d729b8e6934 100644 --- a/apps/theming/tests/IconBuilderTest.php +++ b/apps/theming/tests/IconBuilderTest.php @@ -321,7 +321,7 @@ private function generateTestIcon(string $file, string $format, int $size, strin $finalIconFile->newImage($size, $size, new \ImagickPixel('transparent')); $draw = new \ImagickDraw(); $draw->setFillColor($color); - $draw->roundRectangle(0, 0, $size - 1, $size - 1, $cornerRadius, $cornerRadius); + $draw->roundRectangle(0, 0, $size, $size, $cornerRadius, $cornerRadius); $finalIconFile->drawImage($draw); $draw->destroy(); $finalIconFile->setImageVirtualPixelMethod(\Imagick::VIRTUALPIXELMETHOD_TRANSPARENT);