summaryrefslogtreecommitdiffstats
path: root/system/libraries/Image_lib.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2017-01-06 12:22:16 +0100
committerGitHub <noreply@github.com>2017-01-06 12:22:16 +0100
commit776dd16bdb659421450fe274a941521cdaabfe83 (patch)
tree58f7b3ec8cc109f006e177d105b78aebba0b5209 /system/libraries/Image_lib.php
parent383a5f650511437bb2b591bc74924b0b33687f09 (diff)
parent1be0f05e3f70a369e9e3e5153d0f786c0d2dface (diff)
Merge pull request #4457 from KN4CK3R/develop
Fix CI_Image_lib::get_image_properties() invalid image handling
Diffstat (limited to 'system/libraries/Image_lib.php')
-rw-r--r--system/libraries/Image_lib.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php
index 0685692de..ebcfc6748 100644
--- a/system/libraries/Image_lib.php
+++ b/system/libraries/Image_lib.php
@@ -1639,6 +1639,11 @@ class CI_Image_lib {
}
$vals = getimagesize($path);
+ if ($vals === FALSE)
+ {
+ $this->set_error('imglib_invalid_image');
+ return FALSE;
+ }
$types = array(1 => 'gif', 2 => 'jpeg', 3 => 'png');
$mime = (isset($types[$vals[2]])) ? 'image/'.$types[$vals[2]] : 'image/jpg';