php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59126 readimageblob results in a segmentation fault
Submitted: 2010-03-21 02:13 UTC Modified: 2010-03-21 04:23 UTC
From: swernst at gmail dot com Assigned:
Status: Closed Package: gmagick (PECL)
PHP Version: 5.3.1 OS: linux (fedora 12 x64)
Private report: No CVE-ID: None
 [2010-03-21 02:13 UTC] swernst at gmail dot com
Description:
------------
When using the readimageblob method to convert a binary string into a valid image resource, the readimageblob method results in a segmentation fault if the second file name argument is not supplied.

Reproduce code:
---------------
Given a valid image file stored as a binary string in the variable $data, execution fails on :

$img = Gmagick();
$img->readimageblob($data);

However, execution succeeds on:

$img = Gmagick();
$img->readimageblob($data, 'dummyfilename');

where the only difference is to include a value for the second file name argument.

Expected result:
----------------
I expected the binary string stored in $data to be processed by the method as a valid Gmagick image resource for further processing.

Actual result:
--------------
Following notice written to apache error logs:

exit signal Segmentation fault (11)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-03-21 02:17 UTC] swernst at gmail dot com
Oh, more precisely the reproduce code should properly read:

This one fails:

$img = new Gmagick();
$img->readimageblob($data);

and this one succeeds:

$img = new Gmagick();
$img->readimageblob($data, 'dummyfilename');
 [2010-03-21 04:23 UTC] mkoppanen@php.net
This bug has been fixed in SVN.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 01:01:28 2024 UTC