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
committerAndrey Andreev <narf@devilix.net>2017-01-06 12:23:10 +0100
commit747deff00e0597a1285d416569ef929b14ab8373 (patch)
treef79d30a172b543ee9cf58ae6698e02a24edca37b /system/libraries/Image_lib.php
parent7d80b4d3c48de6234ef617c5545418eb031d52c6 (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 3e45cb845..9eb05c2fd 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';