Page 1 of 1

segv on bad SetPixel

Posted: 2011-01-25T13:47:12-07:00
by kryde
With recent debian i386 packaged perlmagick 6.6.0.4, I passed (in ignorance) a string instead of an arrayref for a SetPixel color, per below, and got a segv (in av_len if gdb is to be believed). It'd be good if SetPixel threw an error of some sort if not given an arrayref there.

Code: Select all

use strict;
use warnings;
use Image::Magick;

my $m = Image::Magick->new (size => '20x10');
if (!$m) { die; }

my $err = $m->ReadImage('xc:black');
if ($err) { die $err; }

$err = $m->SetPixel (x=>3, y=>4, color=>'#AABBCC');
if ($err) { die $err; }

exit 0;

Re: segv on bad SetPixel

Posted: 2011-01-25T18:17:03-07:00
by magick
The problem you reported is fixed in ImageMagick 6.6.7-3 Beta available by sometime tomorrow. Thanks.