From: Yoshihiro Yamazaki Date: Fri, 14 Sep 2012 05:56:11 +0000 (+0900) Subject: wrong compare for imagedata. X-Git-Tag: v0_60~8 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=3512352615a36e0f02bbe1c3c06bc6119099b971;p=swfed%2Fswfed.git wrong compare for imagedata. --- diff --git a/www/swfimagereplace.php b/www/swfimagereplace.php index 6071579..d062cc0 100644 --- a/www/swfimagereplace.php +++ b/www/swfimagereplace.php @@ -29,7 +29,7 @@ function detect_image_ext(&$imagedata) { if (! empty($_FILES['imagefile']['tmp_name'])) { $filename = $_FILES['imagefile']['tmp_name']; $imagedata = file_get_contents($filename); - if ($imagedata > $upload_max_filesize_bytes) { + if (strlen($imagedata) > $upload_max_filesize_bytes) { echo " $upload_max_filesize Bytes 以内のファイルしか受け付けません。\n"; exit(0); }