php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59444 Segfault on pdf file in identifyImage function
Submitted: 2010-10-01 09:52 UTC Modified: 2010-10-03 08:27 UTC
From: pahan at hubbitus dot info Assigned:
Status: Closed Package: imagick (PECL)
PHP Version: 5.3.2 OS: Linux
Private report: No CVE-ID: None
 [2010-10-01 09:52 UTC] pahan at hubbitus dot info
Description:
------------
Segfault happened on pdf file in identifyImage function.

Please refer on our Fedora bug for more info - 
https://bugzilla.redhat.com/show_bug.cgi?id=638352

It always reproducible. Backtraces also available.

P.S. I actually use php version 5.3.4, but it is not listed 
in your dropdown select.

Reproduce code:
---------------
<?php
$imagick = new Imagick();
$imagick->pingImage('/home/rhollencamp/test.pdf');
$image_info = $imagick->identifyImage();

var_dump($image_info);
?>

Actual result:
--------------
segfault

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-10-01 10:20 UTC] mkoppanen@php.net
Looking at the backtrace the crash happens inside ImageMagick. I'll take a proper look later
 [2010-10-01 11:29 UTC] pahan at hubbitus dot info
Please note also ImageMagick standalone command work 
perfectly on this file:
$ identify test.pdf
test.pdf PDF 1200x800 1200x800+0+0 16-bit Bilevel DirectClass 
120KB 0.060u 0:00.020
 [2010-10-01 11:31 UTC] mkoppanen@php.net
Does: 

identify -verbose -ping test.pdf

work as well?
 [2010-10-01 12:49 UTC] rhollencamp at gmail dot com
identify test.pdf works, but identify -verbose -ping test.pdf 
will segfault
 [2010-10-01 12:58 UTC] mkoppanen@php.net
Looks like an ImageMagick bug to me
 [2010-10-03 08:20 UTC] pahan at hubbitus dot info
What is more interesting:
identify -verbose -ping test.pdf
coredumped, but
identify -ping -verbose test.pdf
works well.

In any case, I agree it looks like ImageMagick problem. 
Sorry. I'll contact its upstream developers.
 [2010-10-03 08:27 UTC] mkoppanen@php.net
No worries. Better safe than sorry
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 17 02:01:32 2024 UTC