php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28375 getimagesize only checks global gif header
Submitted: 2004-05-12 19:01 UTC Modified: 2004-05-12 19:03 UTC
Votes:52
Avg. Score:1.2 ± 0.5
Reproduced:0 of 4 (0.0%)
From: scottmacvicar at ntlworld dot com Assigned:
Status: Wont fix Package: GetImageSize related
PHP Version: 4CVS-2004-05-12 (stable) OS: *
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2004-05-12 19:01 UTC] scottmacvicar at ntlworld dot com
Description:
------------
A getimagesize can return a wrong value if corruption or intentional editing has changed the values held in the global header for the gif.

It is possible to find the correct value by scanning through each frame and looking at the local image descriptor values for width and height and returning the largest value.

Both Mozilla and IE do this as standard and ignore the global height and width.

If anyone wants a sample gif I can email them it.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-05-12 19:03 UTC] iliaa@php.net
Scanning the entire gif file would be too slow. It would 
also require the retrieval of the entire file rather then 
just the header, which would be rather slow if the file is 
located on a remote server. 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 05:01:33 2024 UTC