From 0977b25de2174464e4e78106f70e441b1ae3ba09 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Fri, 28 Oct 2022 09:48:08 -0700 Subject: [PATCH] Don't store invalid dims (#129) --- lib/Exif.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Exif.php b/lib/Exif.php index b17c21ec..7ea4d711 100644 --- a/lib/Exif.php +++ b/lib/Exif.php @@ -269,6 +269,10 @@ class Exif return [$height, $width]; } + if ($width <= 0 || $height <= 0 || $width > 10000 || $height > 10000) { + return [0, 0]; + } + return [$width, $height]; }