#36801 [Fbk->Opn]: imagecreagefromstring accepts content of MPEG files

2006-03-20 Thread glavoie at mutehq dot net
 ID:   36801
 User updated by:  glavoie at mutehq dot net
 Reported By:  glavoie at mutehq dot net
-Status:   Feedback
+Status:   Open
 Bug Type: GD related
 Operating System: Debian Sarge GNU/Linux
 PHP Version:  5.1.2
 New Comment:

I use this script to convert images to JPEG with resizing when needed.
When a MPEG file is given to imagecreatefromstring(), $source doesn't
return false and I get an images($source) of 1 and a imagesy($source)
of ~7000. When creating the new resized image with
imagecreatetruecolor, the ratio is huge and an image of about 2.5 GB is
created in memory. 




Previous Comments:


[2006-03-20 19:13:58] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.





[2006-03-20 19:08:30] glavoie at mutehq dot net

Description:

If I give the content of a MPEG file to imagecreatefromstring, it
doesn't return an error. This is causing me an headach with HTTP
graphic file upload since I must be sure that uploaded files are realli
graphic ones for resizing.






-- 
Edit this bug report at http://bugs.php.net/?id=36801&edit=1


#36801 [NEW]: imagecreagefromstring accepts content of MPEG files

2006-03-20 Thread glavoie at mutehq dot net
From: glavoie at mutehq dot net
Operating system: Debian Sarge GNU/Linux
PHP version:  5.1.2
PHP Bug Type: GD related
Bug description:  imagecreagefromstring accepts content of MPEG files

Description:

If I give the content of a MPEG file to imagecreatefromstring, it doesn't
return an error. This is causing me an headach with HTTP graphic file
upload since I must be sure that uploaded files are realli graphic ones
for resizing.


-- 
Edit bug report at http://bugs.php.net/?id=36801&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=36801&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=36801&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=36801&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36801&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=36801&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=36801&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=36801&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=36801&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=36801&r=support
Expected behavior:http://bugs.php.net/fix.php?id=36801&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=36801&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=36801&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=36801&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=36801&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=36801&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=36801&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=36801&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=36801&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=36801&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=36801&r=mysqlcfg