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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: scottmacvicar at ntlworld dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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: Mon Dec 02 20:01:32 2024 UTC