#33162 [Fbk]: imagecreatefromstring segfaults

From: Date: Fri, 27 May 2005 13:18:23 +0000
Subject: #33162 [Fbk]: imagecreatefromstring segfaults
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-79610@lists.php.net to get a copy of this message
 ID:               33162
 Updated by:       pajoye@php.net
 Reported By:      julien at synten dot com
 Status:           Feedback
 Bug Type:         Reproducible crash
 Operating System: Linux 2.4.29
 PHP Version:      4.3.11
-Assigned To:      
+Assigned To:      pajoye
 New Comment:

Cannot reproduce.

You certainly use an external GD and not the bundled version.

Please try using the bundled version ("./configure --with-gd").

--Pierre


Previous Comments:
------------------------------------------------------------------------

[2005-05-27 13:58:55] tony2001@php.net

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.



------------------------------------------------------------------------

[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


Thread (3 messages)

« previous php.bugs (#79610) next »