|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44455 swf files that are a multiple of exactly 4.00kb generate an access violation
Submitted: 2008-03-17 15:09 UTC Modified: 2008-03-17 15:12 UTC
From: phil at flashtalking dot com Assigned:
Status: Not a bug Package: GetImageSize related
PHP Version: 5.2.5 OS: Windows 2003 standard 64 bit SP2
Private report: No CVE-ID: None
 [2008-03-17 15:09 UTC] phil at flashtalking dot com
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'


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-03-17 15:12 UTC]
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Sep 27 13:03:36 2021 UTC