#21518 [Com]: ImageCreateFromString() causes segmentation fault
| From: | bpl at kodu dot net | Date: | Thu, 05 Aug 2004 23:32:44 +0000 |
| Subject: | #21518 [Com]: ImageCreateFromString() causes segmentation fault | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-64170@lists.php.net to get a copy of this message | ||
ID: 21518
Comment by: bpl at kodu dot net
Reported By: jaldinger at consulturdorado dot com
Status: Closed
Bug Type: Reproducible crash
Operating System: Redhat Linux 7.2
PHP Version: 4.3.0
Assigned To: iliaa
New Comment:
Also, php 4.3.8 is no better, result is exactly same.
Previous Comments:
------------------------------------------------------------------------
[2004-08-06 00:09:59] bpl at kodu dot net
I was able to reproduce same error with php 4.3.4
image used in test: http://www.kodu.net/PICT2029.JPG
simple upload script was used (from tiki-wiki)
<?php
$fp = fopen($_FILES['userfile1']['tmp_name'],"rb");
$data = fread($fp,filesize($_FILES['userfile1']['tmp_name']));
fclose($fp);
//following displayes image correctly in browser:
echo $data;
//this crashes apache thread/php
$img = imagecreatefromstring($data);
?>
My system is up-to-date debian sid (updated 05 aug. 2004).
My php configure (debian sid default php4 package):
'../configure' '--prefix=/usr' '--with-apxs=/usr/bin/apxs'
'--with-regex=php' '--with-config-file-path=/etc/php4/apache'
'--disable-rpath' '--enable-memory-limit' '--disable-debug'
'--with-layout=GNU' '--with-pear=/usr/share/php' '--enable-calendar'
'--enable-sysvsem' '--enable-sysvshm' '--enable-track-vars'
'--enable-trans-sid' '--enable-bcmath' '--with-bz2'
'--enable-ctype'
'--with-db4' '--with-iconv' '--enable-exif'
'--enable-filepro'
'--enable-ftp' '--with-gettext' '--enable-mbstring'
'--with-pcre-regex=/usr' '--enable-shmop' '--enable-sockets'
'--enable-wddx' '--disable-xml' '--with-expat-dir=/usr'
'--enable-yp'
'--with-zlib' '--without-pgsql' '--with-kerberos=/usr'
'--with-openssl=/usr' '--with-exec-dir=/usr/lib/php4/libexec'
'--disable-static' '--with-curl=shared,/usr' '--with-dom=shared,/usr'
'--with-dom-xslt=shared,/usr' '--with-dom-exslt=shared,/usr'
'--with-zlib-dir=/usr' '--with-gd=shared,/usr'
'--enable-gd-native-ttf'
'--with-jpeg-dir=shared,/usr' '--with-xpm-dir=shared,/usr/X11R6'
'--with-png-dir=shared,/usr' '--with-freetype-dir=shared,/usr'
'--with-imap=shared,/usr' '--with-imap-ssl' '--with-ldap=shared,/usr'
'--with-mcal=shared,/usr' '--with-mhash=shared,/usr' '--with-mm'
'--with-mysql=shared,/usr' '--with-unixODBC=shared,/usr'
'--with-recode=shared,/usr' '--enable-xslt=shared'
'--with-xslt-sablot=shared,/usr' '--with-snmp=shared'
'--enable-ucd-snmp-hack' '--with-sybase-ct=shared,/usr'
'--with-ttf=shared,/usr' '--with-t1lib=shared,/usr'
Thank you.
------------------------------------------------------------------------
[2003-01-08 12:12:14] iliaa@php.net
This bug has been fixed in CVS.
In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
------------------------------------------------------------------------
[2003-01-08 12:04:10] jaldinger at consulturdorado dot com
Information about the PHP build is also available at:
http://www.kis.fotodom.com/phpinfo.php
------------------------------------------------------------------------
[2003-01-08 12:02:03] jaldinger at consulturdorado dot com
Try with this one:
http://www.kis.fotodom.com/gfx/test.psd
------------------------------------------------------------------------
[2003-01-08 11:53:46] iliaa@php.net
Could you please a provide a sample file that always causes a
segmentation fault?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/21518
--
Edit this bug report at http://bugs.php.net/?id=21518&edit=1