segv on bad SetPixel

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply
kryde
Posts: 2
Joined: 2011-01-25T13:38:40-07:00
Authentication code: 8675308

segv on bad SetPixel

Post 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;
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: segv on bad SetPixel

Post by magick »

The problem you reported is fixed in ImageMagick 6.6.7-3 Beta available by sometime tomorrow. Thanks.
Post Reply