php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59034 imagick exits the php process when bad color profile data is detected
Submitted: 2010-01-18 19:26 UTC Modified: 2010-07-12 09:29 UTC
Votes:7
Avg. Score:4.6 ± 0.7
Reproduced:7 of 7 (100.0%)
Same Version:0 (0.0%)
Same OS:2 (28.6%)
From: gauthierm@php.net Assigned:
Status: No Feedback Package: imagick (PECL)
PHP Version: 5.2.10 OS: Linux (Ubuntu)
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: gauthierm@php.net
New email:
PHP Version: OS:

 

 [2010-01-18 19:26 UTC] gauthierm@php.net
Description:
------------
When bad color data is detected, the PHP process exits. There 
is no segfault, just an exit call.

Sample image located at 

http://labs.silverorange.com/files/peckl-imagick-bug/pecl-
imagick-bad-color-profile-bug.jpg

http://bit.ly/8VXuzQ

Reproduce code:
---------------
error_reporting(E_ALL|E_STRICT);

$filename = dirname(__FILE__).'/pecl-imagick-bad-color-profile-bug.jpg';
$imagick = new Imagick();
$imagick->pingImage($filename);

try {
    $imagick->identifyImage($filename);
} catch (Exception $e) {
    echo "ERROR!\n";
}

echo "All done.\n";

Expected result:
----------------
ERROR!
All done.

Actual result:
--------------
lcms: Error #12288; Read from memory error. Got 4096 bytes, 
block should be of 128 bytes

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-01-27 15:18 UTC] mkoppanen@php.net
Hi,

can't reproduce this one. What happens if you try convert pecl-imagick-bad-color-profile-bug.jpg out.jpg from command-line?
 [2010-01-27 16:17 UTC] mike at silverorange dot com
The convert command on the command-line doesn't show 
anything abnormal.

I can reproduce the error using the provided test script 
every time using both extension version 2.3.0 and version 
3.0.0b2 installed via pecl.

My system is Ubuntu 9.10, using the packaged PHP 5.2.10. My 
ImageMagick version is 6.5.1 as provided by Ubuntu.

Interestingly, only the identifyImage() method seems to 
trigger the error. The getImageWidth/Height() methods don't 
have the same behavior.
 [2010-02-28 07:43 UTC] mkoppanen@php.net
Hi,

sorry, meant identify -verbose pecl-imagick-bad-color-profile-bug.jpg
 [2012-03-20 22:53 UTC] ptanna at stylesight dot com
I am having the same issue. In my case it seems that two images are put into one 
with an overlay and so that may be causing the profile to be corrupted. Its still 
a jpg image. I cant handle the error since the script just exits out.
 [2012-03-20 22:56 UTC] ptanna at stylesight dot com
Also I am running PHP Version 5.3.6-6~dotdeb.0 on a Debian server
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 05 22:01:29 2024 UTC