php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33162 imagecreatefromstring segfaults
Submitted: 2005-05-27 13:06 UTC Modified: 2005-06-04 01:00 UTC
Votes:4
Avg. Score:4.2 ± 0.8
Reproduced:3 of 4 (75.0%)
Same Version:1 (33.3%)
Same OS:1 (33.3%)
From: julien at synten dot com Assigned: pajoye (profile)
Status: No Feedback Package: Reproducible crash
PHP Version: 4.3.11 OS: Linux 2.4.29
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: julien at synten dot com
New email:
PHP Version: OS:

 

 [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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-05-27 13:58 UTC] 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 15:18 UTC] pajoye@php.net
Cannot reproduce.

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

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

--Pierre
 [2005-06-04 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 22:01:28 2024 UTC