php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49034 Infinite loop with corrupted gif in ImageCreateFromgif
Submitted: 2009-07-23 12:41 UTC Modified: 2009-07-23 13:45 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: joce at doctissimo dot fr Assigned:
Status: Not a bug Package: GD related
PHP Version: 5.2.10 OS: debian etch x86-64
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: joce at doctissimo dot fr
New email:
PHP Version: OS:

 

 [2009-07-23 12:41 UTC] joce at doctissimo dot fr
Description:
------------
When doing an ImageCreateFromgif on an invalid gif, php enters in an infinite loop

Reproduce code:
---------------
<?php
ImageCreateFromgif('http://club.doctissimo.fr/static/big-14261284cc.gif');
?>


Expected result:
----------------
return FALSE

Actual result:
--------------
Infinite loop

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-23 13:27 UTC] pajoye@php.net
Not sure you are actually using 5.2.10 with bunlded GD, but it does work fine here. I would suggest to do not use Debian's package for php or at least not for gd.

Not a PHP bug.


 [2009-07-23 13:43 UTC] joce at doctissimo dot fr
Hi,

Actually it's a compiled version of php, using the embed gd :
Configure line : 

./configure  --prefix=/usr/local/php-5.2.10 --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/etc/php5/apache --disable-debug --with-regex=php --disable-rpath --disable-static --with-pic --with-layout=GNU --with-pear=/usr/share/php --enable-calendar --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-bcmath --with-bz2 --enable-ctype --with-db4 --with-iconv --enable-exif --enable-ftp --with-gettext --enable-mbstring --enable-shmop --enable-sockets --with-xmlrpc --with-zlib --without-pgsql --with-openssl=/usr --enable-zip=/usr --with-mime-magic=/usr/share/file/magic.mime --with-curl=shared,/usr --with-zlib-dir=/usr --with-gd --enable-gd-native-ttf --with-jpeg-dir=shared,/usr --with-xpm-dir=shared,/usr/X11R6 --with-png-dir=shared,/usr --with-imap=shared,/usr --with-imap-ssl --with-mhash=shared,/usr --with-mysql=shared,/usr/local/mysql --with-xsl=shared --with-ttf=shared,/usr --with-t1lib=shared,/usr --with-kerberos --with-mcrypt --with-mysqli=shared,/usr/local/mysql/bin/mysql_config --enable-soap --with-pear --with-freetype-dir=/usr/include/freetype2

php -i output : 

phpinfo()
PHP Version => 5.2.10

System => Linux transformer1.doctissimo.fr 2.6.18-5-amd64 #1 SMP Tue Dec 18 21:39:26 UTC 2007 x86_64
Build Date => Jul 23 2009 15:38:45
Configure Command =>  './configure'  '--prefix=/usr/local/php-5.2.10' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-config-file-path=/etc/php5/apache' '--disable-debug' '--with-regex=php' '--disable-rpa
th' '--disable-static' '--with-pic' '--with-layout=GNU' '--with-pear=/usr/share/php' '--enable-calendar' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-bcmath' '--with-bz2' '--enable-ctyp
e' '--with-db4' '--with-iconv' '--enable-exif' '--enable-ftp' '--with-gettext' '--enable-mbstring' '--enable-shmop' '--enable-sockets' '--with-xmlrpc' '--with-zlib' '--without-pgsql' '--with-openssl=/usr' '-
-enable-zip=/usr' '--with-mime-magic=/usr/share/file/magic.mime' '--with-curl=shared,/usr' '--with-zlib-dir=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-jpeg-dir=shared,/usr' '--with-xpm-dir=shared,/us
r/X11R6' '--with-png-dir=shared,/usr' '--with-imap=shared,/usr' '--with-imap-ssl' '--with-mhash=shared,/usr' '--with-mysql=shared,/usr/local/mysql' '--with-xsl=shared' '--with-ttf=shared,/usr' '--with-t1lib=
shared,/usr' '--with-kerberos' '--with-mcrypt' '--with-mysqli=shared,/usr/local/mysql/bin/mysql_config' '--enable-soap' '--with-pear' '--with-freetype-dir=/usr/include/freetype2'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc/php5/apache
Loaded Configuration File => /etc/php5/apache/php.ini
Scan this dir for additional .ini files => (none)
additional .ini files parsed => (none)
PHP API => 20041225
PHP Extension => 20060613
Zend Extension => 220060519
Debug Build => no
Thread Safety => disabled
Zend Memory Manager => enabled
IPv6 Support => enabled
Registered PHP Streams => https, ftps, compress.zlib, compress.bzip2, php, file, data, http, ftp, zip
Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, sslv3, sslv2, tls
Registered Stream Filters => zlib.*, bzip2.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed


This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
    with eAccelerator v0.9.5.3, Copyright (c) 2004-2006 eAccelerator, by eAccelerator


[...]

gd

GD Support => enabled
GD Version => bundled (2.0.34 compatible)
FreeType Support => enabled
FreeType Linkage => with freetype
FreeType Version => 2.2.1
T1Lib Support => enabled
GIF Read Support => enabled
GIF Create Support => enabled
JPG Support => enabled
PNG Support => enabled
WBMP Support => enabled
XPM Support => enabled
XBM Support => enabled

Regards,
  Jocelyn Fournier)
 [2009-07-23 13:45 UTC] joce at doctissimo dot fr
Ok, wrong test with the bundled gd, it indeed works fine, it's just the debian one which is not working correctly.

Thanks and regards,
  Jocelyn Fournier)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 14 10:01:33 2024 UTC