#21518 [Asn]: ImageCreateFromString() causes segmentation fault
| From: | jaldinger at consulturdorado dot com | Date: | Wed, 08 Jan 2003 18:04:10 +0000 |
| Subject: | #21518 [Asn]: ImageCreateFromString() causes segmentation fault | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-29460@lists.php.net to get a copy of this message | ||
ID: 21518
User updated by: jaldinger@consulturdorado.com
Reported By: jaldinger@consulturdorado.com
Status: Assigned
Bug Type: Reproducible crash
Operating System: Redhat Linux 7.2
PHP Version: 4.3.0
Assigned To: iliaa
New Comment:
Information about the PHP build is also available at:
http://www.kis.fotodom.com/phpinfo.php
Previous Comments:
------------------------------------------------------------------------
[2003-01-08 12:02:03] jaldinger@consulturdorado.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?
------------------------------------------------------------------------
[2003-01-08 11:11:23] jaldinger@consulturdorado.com
Update: In occasions (twice) I have received a Warning message about an
unsupported image type, which is what I wanted in the first place.
However, in the other 50+ occasions, the script simply crashes.
------------------------------------------------------------------------
[2003-01-08 10:39:43] jaldinger@consulturdorado.com
Reclassified to "Reproducible crash".
------------------------------------------------------------------------
[2003-01-08 10:22:25] jaldinger@consulturdorado.com
The following script crashes and never gets to process anything below
imagecreatefromstring(). When using the same script with a supported
image type (JPG/PNG/GIF/etc.), the script runs fine. Note: The original
script gets $data from a database instead of from a file.
<?php
$data = file_get_contents('any-unsupported-image.psd');
$source_id = imagecreatefromstring($data);
print_r($source_id);
?>
Here's my configure line:
'./configure' '--prefix=/usr' '--exec-prefix=/usr'
'--bindir=/usr/bin'
'--sbindir=/usr/sbin' '--libexecdir=/usr/libexec'
'--datadir=/usr/share' '--sysconfdir=/etc' '--sharedstatedir=/usr/com'
'--localstatedir=/var' '--libdir=/usr/lib' '--includedir=/usr/include'
'--infodir=/usr/share/info' '--mandir=/usr/share/man'
'--with-apxs=/usr/sbin/apxs' '--enable-force-cgi-redirect'
'--enable-discard-path' '--with-layout=GNU'
'--with-config-file-path=/etc' '--enable-safe-mode'
'--with-exec-dir=/usr/bin' '--enable-magic-quotes' '--disable-rpath'
'--with-openssl' '--with-zlib' '--enable-bcmath'
'--with-bz2'
'--enable-calendar' '--with-curl' '--enable-dbx'
'--enable-dio'
'--with-dom' '--with-dom-xslt' '--with-dom-exslt'
'--enable-exif'
'--enable-ftp=shared' '--with-gd' '--with-jpeg-dir=/usr'
'--with-png-dir=/usr' '--with-ttf' '--with-freetype-dir=/usr'
'--enable-gd-native-ttf' '--with-gettext=shared' '--with-iconv'
'--with-imap=shared' '--with-kerberos' '--with-imap-ssl'
'--with-ldap=shared' '--enable-mbstring' '--with-mysql=shared,/usr'
'--with-unixODBC=shared' '--with-pfpro' '--with-pgsql=shared'
'--with-pspell' '--enable-shmop' '--with-snmp=shared,/usr'
'--enable-ucd-snmp-hack' '--enable-sockets' '--with-regex=system'
'--enable-sysvsem' '--enable-sysvshm' '--enable-wddx'
'--with-expat-dir=/usr' '--enable-yp' '--with-zip'
'--enable-versioning' '--with-pic' '--enable-memory-limit'
The Apache error log contains the following error:
[Wed Jan 8 11:46:00 2003] [notice] child pid 25614 exit signal
Segmentation fault (11)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=21518&edit=1