|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-05-27 13:06 UTC] 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.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 05 01:00:02 2025 UTC |
Cannot reproduce. You certainly use an external GD and not the bundled version. Please try using the bundled version ("./configure --with-gd"). --Pierre