#33162 [Opn->Fbk]: imagecreatefromstring segfaults
| From: | tony2001@php.net | Date: | Fri, 27 May 2005 11:58:56 +0000 |
| Subject: | #33162 [Opn->Fbk]: imagecreatefromstring segfaults | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-79605@lists.php.net to get a copy of this message | ||
ID: 33162
Updated by: tony2001@php.net
Reported By: julien at synten dot com
-Status: Open
+Status: Feedback
Bug Type: Reproducible crash
Operating System: Linux 2.4.29
PHP Version: 4.3.11
New Comment:
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2005-05-27 13:06:32] julien at synten dot com
Description:
------------
imagecreatefromstring seems to segfault when a a bogus string with
letters is provided, works when this string is only non-char.
Reproduce code:
---------------
27/05 12:15 root@meteor /home/julien/www# php
<?php
$test = str_repeat("/", 10);
$gd1 = imagecreatefromstring($test);
echo "OK 10\n";
?>
Warning: imagecreatefromstring()
[http://www.php.net/function.imagecreatefromstring]: Data is not in a
recognized format. in - on line 3
OK 10
27/05 12:15 root@meteor /home/julien/www# php
<?php
$test = str_repeat("bad", 5);
$gd1 = imagecreatefromstring($test);
echo "Normal is OK \n";
?>
zsh: segmentation fault php
27/05 12:15 root@meteor /home/julien/www# php
<?php
$test = str_repeat("/", 10);
$gd1 = imagecreatefromstring($test);
echo "OK 10\n";
?>
Warning: imagecreatefromstring()
[http://www.php.net/function.imagecreatefromstring]: Data is not in a
recognized format. in - on line 3
OK 10
27/05 12:15 root@meteor /home/julien/www# php
<?php
$test = str_repeat("a", 10);
$gd1 = imagecreatefromstring($test);
echo "OK 10\n";
?>
zsh: segmentation fault php
27/05 12:15 root@meteor /home/julien/www# php
<?php
$test = str_repeat("*", 10);
$gd1 = imagecreatefromstring($test);
echo "OK 10\n";
?>
Warning: imagecreatefromstring()
[http://www.php.net/function.imagecreatefromstring]: Data is not in a
recognized format. in - on line 3
OK 10
27/05 12:16 root@meteor /home/julien/www# php
<?php
$test = str_repeat("q", 10);
$gd1 = imagecreatefromstring($test);
echo "OK 10\n";
?>
zsh: segmentation fault php
Expected result:
----------------
No segfaults, just warnings.
Actual result:
--------------
Segfaults.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33162&edit=1