Bug #54723 [NEW]: getimagesize() incorrectly identifies files as ICO which aren't
From:
Operating system: CentOS 5.5
PHP version: 5.3.6
Package: GetImageSize related
Bug Type: Bug
Bug description:getimagesize() incorrectly identifies files as ICO which aren't
Description:
------------
When certain types of files are uploaded, including .MPGs, getimagesize()
incorrectly identifies them as ICOs with a MIME type of
'image/vnd.microsoft.icon'.
I suspect certain files probably have embedded icons in them, which is what
PHP is
detecting and reporting, but the actual file isn't an ICO.
A ~500K sample file can be found here:
http://www.smugmug.com/img/video/problem/php-getimagesize.mpg
Expected result:
----------------
I'd expect FALSE to return, since this isn't a picture and isn't a valid
type PHP
knows about.
Actual result:
--------------
It returns this array:
array(0 => 45,
1 => 82,
2 => 17,
3 => 'width="45" height="82"',
'bits' = 65023,
'mime' = 'image/vnd.microsoft.icon');
--
Edit bug report at http://bugs.php.net/bug.php?id=54723&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=54723&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=54723&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=54723&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=54723&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54723&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=54723&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=54723&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=54723&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=54723&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=54723&r=support
Expected behavior: http://bugs.php.net/fix.php?id=54723&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=54723&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=54723&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=54723&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54723&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=54723&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=54723&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=54723&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=54723&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=54723&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=54723&r=mysqlcfg
Thread (4 messages)
- don at smugmug dot com