summaryrefslogtreecommitdiffstats
path: root/system/libraries/Image_lib.php
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2016-02-12 22:31:15 +0100
committerKN4CK3R <admin@oldschoolhack.me>2016-02-12 22:31:15 +0100
commit1be0f05e3f70a369e9e3e5153d0f786c0d2dface (patch)
tree6be4bba0e53204fd02b6ae9a0a026dff41310985 /system/libraries/Image_lib.php
parent24adbfc5e163de9da72f59e36be6c0ac02bf10c2 (diff)
return false when image isn't valid
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 f594b7125..e3e87f93f 100644
--- a/system/libraries/Image_lib.php
+++ b/system/libraries/Image_lib.php
@@ -1641,6 +1641,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';