From:             phil at flashtalking dot com
Operating system: Windows 2003 standard 64 bit SP2
PHP version:      5.2.5
PHP Bug Type:     GetImageSize related
Bug description:  swf files that are a multiple of exactly 4.00kb generate an 
access violation

Description:
------------
When using the getimagesize function on a compressed swf that is exactly
4.00kb or a multiple of 4.00kb (8.00kb,12.00kb etc) the script terminates
in an access violation.  

We think this may be something to do with the zlib buffer being 4kb. 
However changing the zlib compressed output buffer (at script level) does
not make any difference.

If the file is 4.01kb (or any other size) it works fine or the swf is not
compressed when generated.

I can supply a file that fails, please let me know if you want this.

I am using php 5.1.2 which is not an option on your dropdown box, I
selected 5.2.5 as its nearest the version we are on.




Reproduce code:
---------------
list($width, $height, $type, $attr) = getimagesize('8k_compressed.swf');
print $width."<BR>";
print $height."<BR>";

Expected result:
----------------
I'd expect the script to be able to read the height and width of the swf. 
This works on the vast majority of files we deal with.

Actual result:
--------------
A page with just the code above in results in a 500 error - looking at
fiddler:  'PHP has encountered an Access Violation at 0238B324'

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

Reply via email to