diff --git a/core/modules/system/lib/Drupal/system/Plugin/ImageToolkit/Operation/gd/Resize.php b/core/modules/system/lib/Drupal/system/Plugin/ImageToolkit/Operation/gd/Resize.php index cce2e60..9c8e690 100644 --- a/core/modules/system/lib/Drupal/system/Plugin/ImageToolkit/Operation/gd/Resize.php +++ b/core/modules/system/lib/Drupal/system/Plugin/ImageToolkit/Operation/gd/Resize.php @@ -41,6 +41,10 @@ public function prepare(ImageInterface $image, array &$arguments) { // Assure integers for all arguments. $arguments['width'] = (int) round($arguments['width']); $arguments['height'] = (int) round($arguments['height']); + + if ($arguments['width'] < 0 || $arguments['height'] < 0) { + return FALSE; + } } /**