|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-01-06 11:08 UTC] danack@php.net
-Assigned To:
+Assigned To: danack
[2017-01-07 00:14 UTC] danack@php.net
-Status: Assigned
+Status: Verified
[2017-01-07 00:14 UTC] danack@php.net
[2017-10-24 05:26 UTC] kalle@php.net
-Status: Verified
+Status: Assigned
[2017-10-24 11:09 UTC] danack@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 20:00:01 2025 UTC |
Description: ------------ If an ImagickPixelIterator is dereferenced directly without storing a ref to a variable first, the process will crash when calling methods on an ImagickPixel of a row we are iterating over. Any ImagickPixel method will trigger the "wand->signature == WandSignature" assertion, each on a different line in wand/pixel-wand.c. Tested on PHP 7.0.14 with imagick ext 3.4.2 (ImageMagick 6.9.7-0 Q16 x86_64 2016-12-18). PHP 5.x is affected as well. Test script: --------------- $im = new Imagick(); $im->newImage(1, 1, 'black'); // This works fine $it = $im->getPixelIterator(); $row = $it->getCurrentIteratorRow(); $rgb = $row[0]->getColor(); var_dump($rgb); // This crashes with SIGABRT $row = $im->getPixelIterator()->getCurrentIteratorRow(); $rgb = $row[0]->getColor(); var_dump($rgb); Expected result: ---------------- array(4) { ["r"]=> int(0) ["g"]=> int(0) ["b"]=> int(0) ["a"]=> int(1) } array(4) { ["r"]=> int(0) ["g"]=> int(0) ["b"]=> int(0) ["a"]=> int(1) } Actual result: -------------- array(4) { ["r"]=> int(0) ["g"]=> int(0) ["b"]=> int(0) ["a"]=> int(1) } Assertion failed: (wand->signature == WandSignature), function PixelGetRed, file wand/pixel-wand.c, line 1338. Abort trap: 6